RemcoLengers
ServiceNow Employee
ServiceNow Employee

This is 2 out of 3 blogs, please find first one here "Walkthrough guide for AIOPS and Metrics: Getting a custom Metric into the ServiceNow MID Server API"

 

In the first blog we setup a MID server, created a CI and started ingesting a Metric for that CI.

 

When an Metric Anomaly Alert is detected, or in general when troubleshooting an Alert or Incident, it can be very useful to review the Metrics for the CI. There is a little configuration to associate the metrics to the CI view. This post also explains how to put an metrics on a Dashboard.

 

1. Configure which Metrics need to be displayed for a CI class

 

To go "Metrics View Configuration" 

 

RemcoLengers_0-1724396307772.png

 

This will show which Metrics will be displayed for which CI class. Press "New" to associate the Metric with the class "cmdb_ci_container_rack" we have been using in step 1 of this blog series.

 

RemcoLengers_1-1724397402506.png

 

Next enter the "Title". Select the "Configuration Item Type". And select the "lock" and find the "rack_temperature" metric. Then select "Order" which determines the order of display on the CI view. Press "Submit".

 

RemcoLengers_2-1724397690240.png

 

Then use the filter to show only entries for the class you are working with. 

 

RemcoLengers_0-1724400306145.png

Next go to the "Service Operations Workspace"

 

RemcoLengers_1-1724400384805.png

Then (1)  in "List" under "CMDB" (scroll down) then locate your CMDB class.  Or (2) create your own list under "My Lists" (see other step below)

 

RemcoLengers_2-1724400586839.png

 

RemcoLengers_3-1724400842110.png

 

The select the CI, "Rack1" in this case and then find the "Metrics" tab. It can take a while (5 minutes) before the Metrics show up the first time.

 

RemcoLengers_0-1724402265906.png

 

Next you can click on "Metric explorer" to view all metrics for this CI. Also explore additional metrics, if you configured any.

 

RemcoLengers_1-1724402460384.png

 

Now we have the metric associated to the CI and in case of an Alert they will be displayed as a part of the alert handling which we will see in the 3rd of this blog series.

 

Setup a custom Dashboard for your metrics.

 

Go to the "Service Operations Workspace" and select the "AIOps dashboards". Then select the hamburger menu on the top right and "+Create new".

 

RemcoLengers_3-1724402771140.png

 

Select "In-line editor" and give the Dashboard a name.

 

RemcoLengers_4-1724402880462.png

"Add new element" and select "Data visualization"

 

RemcoLengers_6-1724403002298.png

 

"New Visualization"

 

RemcoLengers_7-1724403031495.png

 

Under the "MetricBase" source

 

RemcoLengers_2-1724408589385.png

 

scroll down until you find your CI class, in this case "Equipment Rack", select it and press "Apply".

 

 

RemcoLengers_4-1724408669360.png

 

Next select the Metric you want to display for that CI class. Leave transform empty.

 

 

RemcoLengers_6-1724408777792.png

After these few simple steps you'll see the Metric starts showing on the Dashboard, don't forget to press "Save".

You can modify the graph to suit your visual needs.

 

RemcoLengers_7-1724408866900.png

 

 

Please find the 3rd blog in this series Configure Metrics to create Anomaly Alerts and IT Alerts here.