Resource Monitoring
You can monitor the health, capacity, and performance of your Oracle Cloud Infrastructure resources when needed using queries or on a passive basis using alarms . Queries and alarms rely on metrics emitted by your resource to the Monitoring service.
Prerequisites
- IAM policies: To monitor resources, you must have the required type of access in a policy written by an administrator, whether you're using the Console or the REST API with an SDK, CLI, or other tool. The policy must give you access to the monitoring services as well as the resources being monitored. If you try to perform an action and get a message that you don’t have permission or are unauthorized, confirm with your administrator the type of access you have and which compartment you should work in. For more information about user authorizations for monitoring, see IAM Policies (Monitoring).
- Metrics exist in Monitoring: The resources that you want to monitor must emit metrics to the Monitoring service.
- Compute instances: To emit metrics, the Compute Instance Monitoring plugin must be enabled on the instance, and plugins must be running. The instance must also have either a service gateway or a public IP address to send metrics to the Monitoring service. For more information, see Enabling Monitoring for Compute Instances.
Working with Resource Monitoring
Not all resources support monitoring. See Supported Services for the list of resources that support the Monitoring service, which is required for queries and alarms used in monitoring.
The Monitoring service works with the Notifications service to notify you when metrics breach. For more information about these services, see Monitoring and Notifications.
On the page for the resource of interest, under Resources, click Metrics.
For example, to view metric data for a Compute instance:
- Open the navigation menu and click Compute. Under Compute, click Instances.
-
Click the name of the instance that you want to see metrics for.
-
On the instance details page, under Resources, click Metrics.
The page displays a chart for each metric. For a list of metrics related to Compute instances, see Compute Instance Metrics.
The Console displays the last hour of metric data for the selected resource. The page shows a chart (graph) for each metric emitted by the selected resource.
For example, default charts for a Compute instance include CPU Utilization and Memory Utilization.
For a list of metrics emitted by the resource, see Supported Services.
For more information about default metric charts, see Viewing Default Metric Charts.
For more information about custom metric charts, see Viewing a Custom Metric Chart. For more information about queries, see Querying Metric Data.
For more information about creating alarms, see Creating an Alarm.
Using the API
For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see SDKs and the CLI.
To create a query, use the SummarizeMetricsData operation.
To create an alarm, use the CreateAlarm operation.