Updated on 2024-11-25 GMT+08:00

Metric Browsing

The Metric Browsing page displays metric data of each resource. You can monitor metric values and trends in real time, and create alarm rules for real-time service data monitoring and analysis.

Monitoring Metrics

  1. Log in to the AOM 2.0 console.
  2. In the navigation pane, choose Metric Browsing.
  3. Select a target Prometheus instance from the drop-down list.
  4. Select one or more metrics from all metrics or by running Prometheus statements.

    • Select metrics from all metrics.
      Figure 1 Selecting metrics from all metrics

      For details about how to set monitoring conditions, see Table 3.

      After selecting a target metric, you can set condition attributes to filter information. For example, RDS DB instances have the CPU usage metric. To check the CPU usage of a specified RDS DB instance type, do as follows:

      In the Metric text box, select the CPU usage metric of the corresponding RDS DB instance. In the Conditions area, set the dimension name to RDS for MySQL or RDS for PostgreSQL and select the corresponding dimension value. The CPU usage metric of the specified RDS DB instance type will be displayed.

      You can click Add Metric to add metrics and set information such as statistical period for the metrics. After moving the cursor to the metric data and monitoring condition, you can perform the following operations as required:

      • Click next to a monitoring condition to hide the corresponding metric data record in the graph.
      • Click next to a monitoring condition to convert the metric data and monitoring condition into a Prometheus command.
      • Click next to a monitoring condition to quickly copy the metric data and monitoring condition and modify them as required.
      • Click next to a monitoring condition to remove a metric data record from monitoring.
    • Select metrics by running Prometheus statements. For details about Prometheus statements, see Prometheus Statements.
      Figure 2 Selecting metrics by running Prometheus statements

  5. Set metric parameters by referring to Table 1, view the metric graph in the upper part of the page, and analyze metric data from multiple perspectives.

    Table 1 Metric parameters

    Parameter

    Description

    Statistic

    Method used to measure metrics. Options: Avg, Min, Max, Sum, and Samples.

    NOTE:

    Samples: the number of data points.

    Time Range

    Time range in which metric data is collected. Options: Last 30 minutes, Last hour, Last 6 hours, Last day, Last week, and Custom.

    Refresh Frequency

    Interval at which the metric data is refreshed. Options: Refresh manually, 30 seconds auto refresh, 1 minute auto refresh, and 5 minutes auto refresh.

  1. (Optional) Set the display layout of metric data.

    On the right of the page, click the arrow next to the graph type, select your target graph type from the drop-down list, and set graph parameters, such as the X-axis name, Y-axis name, and displayed value. For details about the parameters, see Metric Data Graphs.

    A maximum of 200 metric data records can be displayed in a line graph.

    Figure 3 Selecting a graph type

More Operations

You can also perform the operations listed in Table 2.

Table 2 Related operations

Operation

Description

Adding an alarm rule for a metric

After selecting a metric, click in the upper right corner of the metric list to add an alarm rule for the metric.

NOTE:

When you are redirected to the Create Alarm Rule page, your settings made on the Metric Browsing page will be automatically applied to Alarm Rule Settings and Alarm Rule Details areas.

Deleting a metric

Click next to the target metric.

Adding a metric graph to a dashboard

After selecting a metric, click in the upper right corner of the metric list.

Display Background

If this option is enabled, the background will be displayed in the line graph.

Monitoring Logs

AOM can monitor and analyze log data. However, you need to structure logs first. For details, see Log Structuring.

  1. In the navigation pane, choose Metric Browsing.
  2. On the displayed page, click the Log Sources tab.
  3. Select a log group name and a log stream name from the drop-down lists.
  4. In the search box, enter an SQL statement, and click Search to view the log data analysis of the log stream.
  5. Select a graph or table to display the query result. For details about graph types and configurations, see Log Data Graphs.

    • Click to display the current log data in a table.
    • Click to display the current log data in a line graph.
    • Click to display the current log data in a bar graph.
    • Click to display the current log data in a pie graph.
    • Click to display the current log data in a number graph.
    • Click to display the current log data in a digital line graph.
    • Click to display the current log data in a national or provincial map.

  6. Perform the following operations on the query result:

    • Click Create. In the displayed dialog box, set Chart Name and SQL Statement, select a chart type, and click OK.
    • Click Save. In the displayed dialog box, set Chart Name, and click OK to save the visual chart. You can also select a chart, click Save, and modify it as required.
    • Click Save As. In the displayed dialog box, set Chart Name, and click OK to copy the existing visual chart.

      You must save a chart before saving it as a visual chart.

    • Click Download to download the visual data of the current SQL query result. The file is in .csv format.
    • Click Show Chart to expand the charts of the current log stream.
    • Click Hide Chart to collapse the expanded charts of the current log stream.