Querying Data on the Widget
Overview
Once you have selected the way you want to visualise the data on the widget, we now move to querying the data on to the widget. You have already decided how you want to view the data on the widget. Now, we move on to querying the actual data that you want to view on to the widget.
Let us move back to the example of a Chart widget that we discussed in the section about visualisation. We used Chart Widget to view the disk latency of all the ESXi monitors added in Motadata AIOps over a period of time.
After selecting the widget visualisation, you can start querying data on the widget by selecting the group for which you want to query the data. Let us understand the group selection in detail in the next section.
Select Group
First, we start by selecting the data group for which the widget needs to be created. The following groups are available for your selection:
Group | Description |
---|---|
Metric | Select this group if you wish to query the metrics from the monitors onto the widget. |
Availability | Select this group if you wish to query the availability data of monitors onto the widget. |
Log | Select this group if you wish to query the counters related to log data of the monitors onto the widget. |
Flow | Select this group if you wish to query the counters related to flow data of the monitors onto the widget. |
Alert | Select this group if you wish to display the data related to alerts onto the widget. |
In case you select the Sankey visualisation, you can only query Flow Group on to the widget.
In case you select the Heat Map visualisation, You can only query Alert Group on to the widget.
You can even query data from multiple groups onto the widget when you have selected the Chart visualisation. For example, you can query data on a widget to show the CPU utilisation values from a specific set of monitors on the system by adding the Metric group. You can club together this dataset with the Alert Group and you can view if there are any metric alerts raised currently in the system for any of these monitors.
You cannot add Availability Group on to the widget if you have already selected any other group to query data from.
Continuing from our example, let us select Metric Group to query the metrics related to disk latency of all the ESXi monitors as shown below.
Now, let us select the counters related to the group we have selected.
Select Counter
After selecting the group, we now move to selecting the counter that you want to display on the widget.
Click on the Select Counter drop-down to search the counter that you are looking to query on the widget. You can type and search the counter that you are looking for. In case you do not know the exact metric name that you are looking for, you can use the Metric Explorer to search the metric that you are looking for or study the list of metrics available based on the infrastructure you wish to monitor.
Continuing our example, we want to query the disk latency of all the ESXi monitors in the system. We will select the metric esxi.disk.latency.ms to do so.
Select the Aggregate Function
After selecting the counter, let us now select the aggregation function to modify the data as per our need. These aggregation functions modify the results of our query to provide meaningful visualisations on the widget.
This option is available next to the Counter dropdown. By default, this is chosen as Avg. This means that the average of all the available polling values of the selected metric in the selected time is shown on the widget.
You can also select other functions such as Min, Max, Sum, Count and these functions are applied in a similar mannner as the Avg function i.e., as an aggreagate function on all the polling values available. This aggregation of the polling values enables plotting the data onto a single line on the widget.
Select Source Filter
After selecting the group and counters, let us now select the source i.e, the device for which you want to display the data.
Click on the drop-down titled Everywhere to select the source device from which you want to query the counter you selected in the previous step.
The following options are then available for you to select the source.
Source Filter | Description |
---|---|
Monitor | Select this option if you wish to select specific monitor(s) as the source. |
Group | Select this option if you wish to select one or more groups as the source. All the monitors in the selected group(s) will be selected as the source. |
Tag | Select this option if you wish to select one or more tags as the source. All the monitors that belong to the selected tag(s) will be selected as the source. |
In case you do not specify a Source Filter, then the data will be queried from all the monitors in the system that have the selected counter.
Option | Description |
---|---|
Source | Use the "Source" option to specify the data source for the Widget. Depending on your selection in the previous step, you can configure the source in the following ways: - If you previously selected "Monitor," use this option to specify the monitor(s) you want to select as the data source. If no specific monitor is specified, all the monitors in the system with the selected counter will be included as the data source. - If you previously selected "Group," use this option to specify the group(s) you want to select as the data source. If no specific group is specified, all the monitors from all the groups in the system will be included as the data source. - If you previously selected "Tag," use this option to specify the tag(s) you want to select as the data source. If no specific tag is specified, all the monitors from all the tags in the system will be included as the data source. |
Continuing our example, we want to query the disk latency of all the ESXi monitors in the system. Thus, we will not specify any source in the query as this means all the monitors in the system with the selected counter esxi.disk.latency.ms will be selected as the source.
Select how the counters are grouped on the Widget
You can chose what constitutes a datapoint on a widget graph by specifying how each metric value is grouped on the widget after aggregation. This option is available just below the selection of the aggregate function option and is labelled as Result By.
Let us try to understand this by continuing with our example where we want to view the latency values for all the ESXi monitors on the widget. Thus, we will select Monitor in the Result By section. This would mean that each datapoint or each line that constitutes of multiple datapoints would constitute the latency values of each monitors.
To understand in detail how the aggregation function and the Result By work together, consider the following:
Suppose there are 3 ESXi monitors M1, M2, and M3 discovered in AIOps. Thus, according to the query that we have built for the widget, these three monitors will qualify to be displayed on the widget. The polling for these monitors is being done at an interval of 10 mins and we receive the polling values for ESXi.disk.latency as shown below:
Now considering the aggregation is set as Avg and no grouping option is selected in Result By, the calculation will be done as follows:
The average in this case is applied across the latency values of all the three monitors. This means that the average latency at 00:00 on the widget comes up as (19+7+1)/3 = 9 ms. This is one of the data point of a line on the widget. Similarly the other data points at 00:10 and 00:20 are 14 ms each as shown above.
Now considering the aggregation is set as Avg and grouping option is selected in Result By as Monitor, the calculation will be done as follows:
The average in this case is applied across the latency values of all the monitors individually. This means that the average latency will be calculated for each of the monitor seperately. Thus, all the monitors have a seperate line on the widget. Each line consists of the selected counter on a specific host aggregated using the aggregation function chosen i.e., average in this case.
Apply Filter
You can use the filter option on the metric values before they are aggregated and then grouped on the widget. This allows you to narrow down to specific metric values that are more appropriate for visualisation on the widget.
Filtering enables you to either exclude certain metric values or only include a subset of metric values from all the available metric values.
Continuing our example of plotting disk latency of ESXi monitors on the widget, let us suppose that we need to exclude metric values of certain disks from the widget because these do not belong to production servers and we do no need to include the disk latency values from these servers in our widget.
We can do so by using the Filter option. For more information on the filter option, check Common UI elements across the platform.