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 .
Administrators: For example policies, see Query Metrics for a Metric Namespace (restricted to a metric namespace) and Query Metrics (unrestricted).
This section describes how to select the metric namespace on the Metrics Explorer page. For alarm query edits, see Creating a Basic Alarm.
Use the oci monitoring metric-data summarize-metrics-data command and required parameters to query metric data. Use the
--namespace
parameter to select the metric namespace for the query.oci monitoring metric-data summarize-metrics-data --namespace <metric_namespace> [...]
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
namespace
attribute to select the metric namespace for the query. For an example, see SummarizeMetricsDataDetails.