Selecting the Metric Name for a Query
Select the name of the metric for querying metric data in Monitoring.
- Example: CPU Utilization
-
CpuUtilization[1m].mean()
Valid metric names include predefined service metrics as well as custom metrics. For names of predefined service metrics, see Supported Services and Listing Metric Definitions. For alarm instructions, see Creating a Basic Alarm.
This section describes how to select the metric name on the Metrics Explorer page. For alarm query edits, see Creating a Basic Alarm.
- Create a basic query on the Metrics Explorer page.
- If the query isn't open, open it by selecting Edit queries.
- Select the Compartment that contains the metric name that you want.
- Select the Metric namespace that contains the metric name that you want.
- Select the Metric name that you want.
- Select Update Chart.
Use the oci monitoring metric-data summarize-metrics-data command and required parameters to query metric data. Use the
--query-text
parameter to select the metric name (part of the MQL expression).oci monitoring metric-data summarize-metrics-data --query-text <mql_expression> [...]
For a complete list of parameters and values for CLI commands, see the Command Line Reference for Monitoring.
Run the SummarizeMetricsData operation to query metric data. Use the
query
attribute to select the metric name (part of the MQL expression). For an example, see SummarizeMetricsDataDetails.