Selecting the Metric Namespace for a Query
Select the metric namespace for querying metric data in Monitoring.
Before You Begin
IAM policies: To query metrics, you must be given the required type of access in a policy written by an administrator. This requirement applies whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you get a message that you don’t have permission or are unauthorized, check with the administrator. You might not have the required type of access in the current compartment .
This section describes how to select the metric namespace on the Metrics Explorer page. For alarm query edits, see Creating a Basic Alarm.
- If the query isn't open, open it by clicking Edit queries.
Select the Compartment that contains the metric namespace that you want.
The page lists metric namespaces for the selected compartment. For example, if the current compartment contains load balancers, then the page includes oci_lbaas in its list of metric namespaces.
- Select the Metric namespace that you want.
- Click Update Chart.
Use the oci monitoring metric-data summarize-metrics-data command and required parameters to query metric data. Use the
--namespaceparameter to select the metric namespace for the query.
oci monitoring metric-data summarize-metrics-data [...] --namespace <metric_namespace> [OPTIONS]
For a complete list of flags and variable options for CLI commands, see the Command Line Reference for Monitoring.