Skip to main content
Sumo Logic

Lab 3 - Create a Query to Visualize Metrics

This lab teaches you how to start a metrics query and become more familiar with the metrics interface.
  1. To visualize your data, click New in the tab bar and select Metrics.

    clipboard_e5ce3ddb665a061c8cf0add8d6f19c66d.png
     
  2. To view Metric:CPU_LoadAvg_15min for all hosts, run the following query:

clipboard_e9c83cc6ce920b394fdf22721c705a944.png

  1. Click on the Chart option to display the Metrics in a graphical format
    Screen Shot 2020-09-23 at 7.58.48 AM.png
  2. If your graph shows several metrics plotted notice how _sourceCategory and _Collector are different for each metric. This is because several users might have uploaded the same CPU_LoadAvg_15min metric from each of their hosts.

To add an filter, click on the filter area within the query and select your filter from the list shown.

If you want to add operators, like Sum or Rate to that query click the grey plus sign clipboard_e63f29188424c33da8510bd856c1396c6.png 

  1. To view the metric for your host only, run the following:

clipboard_e58df5a2a3832946cce4ba732d6ceac84.png

Metric:CPU_LoadAvg_15min _sourceCategory=hostmetrics/<your_name>

Note: to identify your own metric there are other options (i.e _source); however a best practice would be to use _sourceCategory.

To add another metric query you click on the Plus sign  clipboard_e5812552de86eec32fb0f5d3174273e0b.png.  on the far right.

clipboard_e5a9b2833c5380088fb192e505c1977f6.png

6. To compare your metric to the average value for all hosts, create a new metric in the space below with the following query:


clipboard_ed5e87dc4c09f616440f61f6d3122bd45.png

Metric:CPU_LoadAvg_15min average