Observability 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
- Log in to the AOM 2.0 console.
- In the navigation pane, choose Metric Browsing.
- Select a target Prometheus instance from the drop-down list.
- Select one or more metrics through interaction or by using PromQL. For details about how to set monitoring conditions, see Table 3.
- Select metrics through interaction. Figure 1 Selecting metrics through interaction
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. You can perform the following operations after moving the cursor to the metric data and monitoring condition:
- 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.
- Click
- Select metrics by using PromQL. For details about Prometheus statements, see Prometheus Statements.
- Click Add Prometheus Statement to add multiple Prometheus statements.
- Click
next to a Prometheus statement to delete the corresponding row.
Figure 2 Selecting metrics by using PromQL
- Select metrics through interaction.
- 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. Samples: the number of data points.
Time Range
Time range in which metric data is collected. Options:
- From now: queries data generated in a time range that ends with the current time, such as the previous 1, 5, or 15 minutes. For example, if the current time is 19:20:31 and 1 hour is selected as the relative time from now, the graphs on the dashboard display the data that is generated from 18:20:31 to 19:20:31.
- From last: queries data generated in a time range (on the hour) that ends with the current time, such as the previous 1 or 15 minutes. For example, if the current time is 19:20:31 and 1 hour is selected as the relative time from last, the graphs on the dashboard display the data that is generated from 18:00:00 to 19:00:00.
- Specified: queries data that is generated in a specified time range.
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.
- (Optional) Set the display layout of metric data.
On the right of the page, click the down arrow, select a desired graph type from the drop-down list, and set graph parameters (such as the X axis title, Y axis title, and displayed value). For details about the parameters, see Metric Data Graphs. Up to 200 metric data records can be displayed in a line graph.
Figure 3 Selecting a graph type
Monitoring Logs
- In the navigation pane, choose Metric Browsing.
- On the displayed page, click the Log Sources tab.
- Select Log stream and configure the parameters by referring to Table 2.
- Selecting a log stream
Table 2 Configuration for log stream monitoring Parameter
Description
Log Group
Select a desired log group from the drop-down list. If there is no log group you want to select, click Add Log Group to add one.
- Enter a log group name. Only letters, digits, underscores (_), hyphens (-), and periods (.) are allowed. Do not start with a period or underscore, or end with a period.
- Set the log retention duration. Default: 7 days. Range: 1–30 days. The logs that exceed the retention period will be deleted automatically. You can dump logs to OBS buckets for long-term storage.
- Click OK.
Log Stream
Select a desired log stream from the drop-down list. If no structuring rule is configured, configure one. For details, see Log Structuring.
If there is no log stream you want to select, click Add Log Stream to add one.
- Enter a log stream name. Only letters, digits, underscores (_), hyphens (-), and periods (.) are allowed. Do not start with a period or underscore, or end with a period.
- Click OK.
Time Range
Options:
- From now: queries data generated in a time range that ends with the current time, such as the previous 1, 5, or 15 minutes. For example, if the current time is 19:20:31 and 1 hour is selected as the relative time from now, the graphs on the dashboard display the data that is generated from 18:20:31 to 19:20:31.
- From last: queries data generated in a time range (on the hour) that ends with the current time, such as the previous 1 or 15 minutes. For example, if the current time is 19:20:31 and 1 hour is selected as the relative time from last, the graphs on the dashboard display the data that is generated from 18:00:00 to 19:00:00.
- Specified: queries data that is generated in a specified time range.
Refresh Frequency
Interval at which the data is refreshed. Options: Refresh now, Refresh every 30 seconds, Refresh every 1 minute, and Refresh every 5 minutes.
Graph Type
Options: line, digit, table, bar, digital line, pie, and map graphs.
Graph Settings
On the right of the page, click the down arrow, select a desired graph type from the drop-down list, and set graph parameters (such as the X axis title, Y axis title, and displayed value). For details about the parameters, see Log Data Graphs.
Interactive mode
Metrics
Use a statistics function on a selected field to calculate your desired metric. You can select an option from the drop-down list. Options: Log count, Aggregation statistics, and Estimation function.
- Log count: count(*), Logs with non-null field values, Logs with non-zero field values, and Logs with different field values
- Aggregation statistics: max(), min(), avg(), sum(), earliest(), and latest().
- Estimation function: Median and Percentile
Alias
Alias of a metric. After setting an alias, it takes precedence.
Conditions
Conditions for filtering metric data. A condition comprises a field and a value. The field can be selected directly from the drop-down list. Multiple conditions can be set using AND or OR.
Group
Group the values by selected field (group by), collect metric statistics by group, and sort the results by order (order by).
Sort
Copy to Syntax Mode
After setting parameters such as Metrics and Conditions in interactive mode, you can preview the search statement. By clicking Copy to Syntax Mode, you can switch to the syntax mode.
Format SQL
Click
to set the formatting SQL statement and reverse formatting SQL statement to optimize the search statement and improve the search efficiency.Syntax mode
Enter a statement in the search box to query logs. The search analysis syntax consists of the search statement and SQL analysis statement. The two statements are associated by using the pipe character (|).
Related Operations
You can also perform the operations listed in Table 3.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot
