Creating a Query for Managed Instances
Define a query for to retrieve data for managed instances in OS Management Hub.
Create a metric query for OS Management Hub resources using the metric namespace oci_osmh
. For general information about metric queries, see Building Metric Queries.
- Open the navigation menu, and click Observability & Management. Under Monitoring, click Metrics Explorer.
- From the Console header, select the region that contains the metric data that you want. For more information about regions, see Understand Regions and Working Across Regions.
- (Optional) To change the time range for the query, select the range you want from Quick Selects. Or, you can define a custom range by specifying the Start time and End time.
-
In the Query area under the chart, select the metric:
- Compartment: Select the compartment that contains the instances to monitor.
- Metric namespace: Select
oci_osmh
. - Metric name: Select a metric. See OS Management Hub Metrics Reference for a description of each metric.
- (Optional)
In the Metric dimensions area, you can further refine the query:
- Dimension name: Select a dimension.
- Dimension value: Select a dimension value
- Click Update Chart.
Use the oci monitoring metric-data summarize-metrics-data --namespace oci_osmh command and required parameters to query metric data. Set
--namespace
tooci_osmh
.oci monitoring metric-data summarize-metrics-data --namespace oci_osmh [OPTIONS]
For a complete list of parameters and values for CLI commands, see the Command Line Reference for Monitoring.
Run the SummarizeMetricData operation to query metric data. Set
namespace
tooci_osmh
.