Creating a graph diagram
During the creation process of the graph, each column you add to the workspace (that is, every group of nodes in the graph) is represented as an object defined by 3 factors: type, name and attributes.
By default, each column you add is assigned to a different type, which is a set of settings that affect all the corresponding nodes in the graph. You can group columns containing the same kind of information under the same type and apply the same settings to their values. To do it, select the type icon of a column and drag it to the new type you want it to be under.
In the capture below, we have grouped the userId and srcPort columns under the same type (type-2).
To access the type settings, click the required type icon. You will find the options described in the following table:
Select an icon to represent the values belonging to the type column(s) in the graph.
Choose the metric you want to use to assign a color to each of the column values.
Select the color for your nodes if you select Type/Attribute in the Color by setting. Besides, this color will serve as a base for the Size and Degree options.
Choose the color scale to be used for the Size and Degree options. The available options are Standard (8 colors), Pastel (24 colors) and Monochrome (10 colors).
This is the name of the group of nodes, which corresponds to the name of the column. In the graph, this name will appear when you hover over a node, next to the assigned type.
The values of a column will show their corresponding names in the graph. However, you can add them labels with names of other corresponding column values using the label attribute. See how to do it below.
These are optional attributes that you can assign to each column. Drag a column to the corresponding attribute icons to use its values as labels, positions or colors.
The value names of the column you add here will be shown as labels of the nodes.
Each distinct value will display the name of the correpsonding value in the label column. In case a node has more than one associated values in the label column, only the first one will be displayed in the label, and the rest will be shown when you hoven over the node.
Column values can be represented on a map if you drag a column containing geocoordinates to this field. You must activate Map mode option in the graph to display the world map and geolocate your nodes. Learn more in the Graph diagram menu article.
Drag the column header whose values will dictate the color of the nodes. The column must contain discrete values. If the values are string type, each distinct value will be displayed in a different color. If the values are number type, a dark to light monochrome color palette is used for the minimum to maximum values, respectively.
You must select Type/Attribute in the Color by field of the corresponding type to consider this attribute.
How to create a graph diagram
Follow these steps to create your graph diagram:
Go to Data Search and open the required table.
Query the data as needed and select Additional tools → Charts → Diagrams → Graph diagram from the query toolbar.
Select and drag to the workspace the first column whose values you want to represent in the graph. Remember that each of the distinct values of the column will become a node in your graph.
Now click and drag the header of the column whose values you want to link to the ones of the previously added column, and set the type and attributes of both columns as necessary.
Note that at least two columns are required in order to build a graph diagram. Columns are automatically linked when you add them, thus creating the corresponding relationships between their nodes in the graph. To remove a link, select the arrow linking the columns and hit the DELETE key. To create it again, hover over the column icon, click the + that appears and drag the mouse to the column you want to link to. You can add as many columns as required and create relationships as needed.
- When the first relationship is created, an icon appears to add link metrics. You can drag a column here to use its values as metric for definying the width of the links. For example, you can aggregate your data and add a count column to define the width of the links. You can add several metrics and choose the required one in the Link widths setting of the graph. Learn more about this in the Graph diagram menu article.
Before generating the graph diagram, you can configure the node selection mode in the graph. Select the ... button that appears at the bottom left corner, where you can choose a Selection mode. This will set the behavior when you double-click a node in your graph. Learn more about this setting in the Graph diagram menu article. Moreover, you can add filters to show only specific values in the graph. Click the + icon, then enter the word you want to filter by and select the type(s) you want to apply the filter to.
In the example below, we want to get only GET values from the column(s) belonging to our type-0.
Select Apply when everything is set up. The graph diagram is generated and you can see the relationships between the columns you selected, as well as setting different visualization and behavior options. See the Graph diagram menu article to learn more about this.
In the following example, we will create a graph diagram using the data from the following query:
Go to Data Search→ Free Text Query, paste the query script in the text field and select Run.
Select Additional tools → Charts → Diagrams → Graph diagram from the query toolbar.
Select the srcIp and dstIp columns and drag them to the workspace. Both columns will be automatically linked.
Click and drag the column header whose column values will define the relationship between the nodes. In this example, this is the count column.
Now we will add the srcPos and dstPos columns in our query to geolocate our IP addresses on a map. Drag them to the position attribute of the corresponding column (srcPos → srcIp / dstPos → dstIp).
Drag the srcCountry and dstCountry columns to the color attribute of the corresponding column, which contain the descrete values that will color-code the nodes of the columns added (srcCountry → srcIp / dstCountry → dstIp).
Geolocation operations are available to generate geolocated information based upon existing table data, such as IP address. In this data table, the srcPos and dstPos columns were generated using the Latitude and longitude coordinates operation, and the srcCountry and dstCountry columns were generated using the Geolocated Country operation.
Click Apply to generate the graph diagram. Finally, toggle on the Map mode option to geolocate the IP addresses on the world map.
For an use case on how to build a graph diagram to detect and analyze accesses to malicious sites, see the Monitor intranet traffic to dangerous websites use case.