Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.
Versions
  • Madrid
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store
Close

Use Advanced Insights Explorer to query CI metric data

Log in to subscribe to topics and get notified when content changes.

Use Advanced Insights Explorer to query CI metric data

Advanced Insights Explorer lets you query metric data for CIs for which metric data is collected. CIs for the query can be from different sources such as application services, relationships, or a list of anomalous CIs. Query results are displayed in charts for further understanding of system behavior.

Before you begin

Role required: evt_mgmt_user

About this task

Use Advanced Insights Explorer to create queries such as:
  • Server CPU metric value that is higher than a given value.
  • Metrics for all Apache Servers in which CPU utilization is greater than 90% and anomaly score is greater than 8 for a given time period.
  • Metrics for the top 10 Apache Servers with CPU utilization of 80%.
A query in the Advanced Insights Explorer consists of a query title, a time range, a combination of one or more guided expressions or script expressions, and the resulting chart of the query. Each guided expression or script expression defines a set of CIs and a metric type whose values are retrieved for the set of CIs. The Advanced Insights Explorer utilizes the platform scripting capability to run the queries.
Guided Expression
A query expression that you create by using a wizard. After you complete the wizard, the query is converted into a JavaScript code snippet that can run using the platform scripting capability.
Script Expression
A query expression that is based on a direct entry of JavaScript. You can create a custom script, which, for example, queries for data that is not supported by default. You can create a custom function to use in a script expression.

Some of the data that the Advanced Insights Explorer queries, is stored as time series. The Advanced Insights Explorer uses metric data time series, anomaly scores time series, and upper and lower bounds time series. The result of a query then is a single time series or a set of time series that satisfy the criteria specified in the query expressions.

Open the Advanced Insights Explorer, by navigating to Operational Intelligence > Advanced Insights Explorer. Then do any of the following steps.

Procedure

  • In the Queries sidebar, select a query to edit or click New Query and then select the new query to edit.
  • Add a guided expression to a query:
    1. If the Guided Expression tile is not visible, click Add Expression.
    2. Click Create Expression on the Guided Expression tile to open the Create An Expression dialog box.
    3. Configure the settings on the Select Data Source tab to define the data set and to select the metric type for the query, and then click Next.
      Your selection of CI Source determines which other fields appear.
      Field Description
      CI Source Source from which to select CIs for the query. Most options are tables such as Metric table and Service table. Another option is Existing Guided Expression.
      CIs Filters the CIs from a table selected in CI Source to a specific class. You can add other conditions that CIs must satisfy.
      Parent or Child Filters the set of CIs for the query to those CIs that are parent or child CIs in the relationships in the CI Relationship [cmdb_rel_ci] table.

      Applies when CI Source is set to Relationships table.

      Guided Expression

      Limits the CIs for the query to the results of an existing guided expression.

      When CI Source is set to Relationships table, the specified guided expression further filters the set of CIs by joining the resulting CIs from the guided expression to the opposite of what is selected in Parent or Child.

      For example: Parent or Child is set to Parent and a guided expression is specified. The list of records from which the parent CI is selected in the cmdb_rel_ci table, is further limited to only those records whose child CI is included in the results of the specified guided expression.

      Also applies when CI Source is set to Relationships table.

      Anomaly Score Filters the set of CIs for the query to those CIs whose anomaly score satisfies the Anomaly Score criteria. Anomaly score values range from 0—10.

      Applies when CI Source is set to Anomaly score table.

      Metric Type Metric type for which to retrieve data for the set of CIs in the query.
    4. Configure the settings on the Filter Data Series tab to filter and sort anomaly score and data time series for the query. Then click Next.

      You can independently set the Data Filter and the Anomaly Score Filter. Both filters can be enabled or disabled, or one of them can be enabled and the other disabled.

      Each time series from the Select Data Source tab is filtered through the data filter and the anomaly score filter, if enabled. Only time series that satisfy the enabled filters, are included in the data set for the query. If both filters are disabled, then the entire data set from the Select Data Source tab, is included in the query without filtering.

      Table 1. Data Filter/Anomaly Score Filter
      Field Description
      Aggregation Aggregation type (such as average, minimum, or maximum) to use for aggregating each time series.
      Start date

      End date

      Time range of the time series to which the specified Aggregation is applied.
      Condition

      Value

      Condition that the aggregated time series needs to satisfy to be included in the query.
      Table 2. Limit and Sort
      Field Description
      Limit Data Series The number of data series to use for the query, counting from the top of the set of filtered and sorted data series.
      Sort

      The sort order for the resulting CIs.

      If both, the data filter and the anomaly score filter are enabled, then choose which of those filters to use for sorting the results.

    5. Configure the settings on the Select Output Options tab to format the output, and then click Done:
      Table 3. Transform Options
      Field Description
      Group by A CI column (attribute) by which to group the query results. For example, the datacenter attribute of the CI.
      Transform Output Aggregation type to apply when aggregating all the time series in each group (as specified in Group by) into a single time series. Click the '+' or '-' to add or remove transforms to apply to the query results.
      Table 4. Output Types
      Field Description
      Metric Include charts of metric time series in the query results.
      Bounds Include charts of upper and lower bounds time series in the query results.
      Anomaly Score Include charts of anomaly score time series in the query results.
      Note: If you set any of the Transform Options, then the Bounds and Anomaly Score output types are not available.
  • Add a script expression to a query:
    1. If the Script tile is not visible, click Add Expression.
    2. Click Create Expression in the Script tile.
    3. Type in a custom Java script.
  • Query actions:
    • Click Run to run a query.
    • Click Save to save a query.
    • Point to specific areas on the report graph to show details specific to that time.
    • Use Search in the Queries sidebar, to search for a query.
    • Click a query title in the header of the query pane to rename a query.
    • Set a time range for a query by overwriting the default start and end times in the header of the query pane.
    • Click Event Management icon to export the report in a PNG, SVG, or PDF format.
  • Click Event Management icon (expression options) next to an expression and then click any of the actions such as Edit (available only for guided expressions) or Duplicate.
  • Click Event Management icon to modify chart configuration settings and then click Apply.
  • Set the display_monitored_object_type system property to 'true' to configure Advanced Insights Explorer to show the specific monitored object type that is associated with a referenced source metric type.
    A single source metric type can be associated with multiple monitored object types, therefore it is useful when the specific monitored object type appears next to the source metric type that is referenced. For example, '% Idle Time' is associated with 'Microsoft.Linux.RHEL.5.OperatingSystem' and 'Microsoft.Windows.Server.2003.LogicalDisk'.
    • To open the System Property [sys_properties] table, enter sys_properties.list in the navigation filter.
    • To see the Monitored Object Type and Source Metric Type combinations in the Monitoring System Metric Types list view, navigate to Operational Intelligence > Metric Types.
Feedback