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_e4a696d025ca386781286c088cd25d589.png

    You should see the following interface that looks like this:

    clipboard_e4369dd5b521dbd33ea34ba5d15e3d1d0.png

    If you see this - where it Enter a Metric Query, your interface is Advanced Mode.  You will need to switch it to basic mode by clicking on the More Action button, the three vertical dots on the far right, as shown below and click Basic Mode

    clipboard_ef6c396d6b43b22fa4c974c6bc1c231ae.png

    The difference between Basic Mode and Advanced Mode will be explained in a later lab.  But in Basic Mode when you click on Metric, you will be able to see a pick list of available metrics, as shown below:

    clipboard_e987f228a2a29d111ddcef51dea4e1b09.png
     
  2. Select CPU_LoadAvg_15Min to view that metric for all hosts.  Your query and results should look like this: clipboard_e9c83cc6ce920b394fdf22721c705a944.png
  3. Click on the Chart option to display the Metrics in a graphical format
    Screen Shot 2020-09-23 at 7.58.48 AM.png
  4. 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_initials>

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_e16435be38835d3a39c213d77a52a33b3.png.  on the far right.

clipboard_e89d8d4808402f6105c13817c15fa5f0f.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_e634591f2adc42d0656b7e9564cf19648.png

Your results should look like this:
clipboard_e5019d0c3571ea6a1d62fd13551ed48bf.png

Well Done, you have started to create a query in Basic Mode, selecting the metric via a drop-down pick list, then you added another metric to see the avg of all of the hosts that are in this environment.