Selecting a Resource Group in a Query
Limit returned metric data by matching a resource group when querying custom metric data in Monitoring.
Resource groups are available with custom metrics. Blank (null) for resource group returns metric data that does not have a resource group.
For troubleshooting, see Troubleshooting Queries.
This section describes how to select the resource group for a new query on the Metrics Explorer page. For alarm query edits, see Creating an Alarm.
- Create a basic query on the Metrics Explorer page.
- Select the Compartment that contains the custom metric that you want.
- Select the Metric namespace that contains the custom metric that you want.
- Select the Resource group that you want.
- Provide minimum required fields: Select a Metric name.
- Click Update Chart.
Use the oci monitoring metric-data summarize-metrics-data command and required parameters to query metric data. Use the
--resource-groupparameter to select a resource group for the query.
oci monitoring metric-data summarize-metrics-data [...] --resource-group <resource_group_name> [OPTIONS]
For a complete list of flags and variable options for CLI commands, see the Command Line Reference for Monitoring.
Run the SummarizeMetricsData operation to query metric data. Use the
resourceGroupattribute to select a resource group for the query.