Compute Instance Metrics
You can monitor the health, capacity, and performance of your Compute instances by using metrics, alarms, and notifications.
This topic describes the metrics emitted by the metric namespace oci_computeagent
(the Compute Instance Monitoring plugin on Compute instances).
You can view these metrics for individual Compute instances, and for all the instances in an instance pool.
Resources: Monitoring-enabled Compute instances.
Overview of Metrics for an Instance and Related Resources
This section gives an overall picture of the different types of metrics available for an instance and its storage and network devices. See the following diagram and table for a summary.
Metric Namespace | Resource ID | Where Measured | Available Metrics |
---|---|---|---|
oci_computeagent
|
Instance OCID | On the instance. The metrics in this namespace are aggregated across all the related resources on the instance. For example, DiskBytesRead is aggregated across all the instance's attached storage volumes, and NetworkBytesIn is aggregated across all the instance's attached VNICs. |
|
oci_blockstore
|
Boot or block volume OCID | By the Block Volume service. The metrics are for an individual volume (either boot volume or block volume). | See Block Volume Metrics. |
oci_vcn
|
VNIC OCID | By the Networking service. The metrics are for an individual VNIC. |
See VNIC Metrics. |
Prerequisites
- IAM policies: To monitor resources, you must be given 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've been granted and which compartment you should work in. For more information on user authorizations for monitoring, see the Authentication and Authorization section for the related service: Monitoring or Notifications.
- 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.
Available Metrics: oci_computeagent
The compute instance metrics help you measure activity level and throughput of compute instances. The metrics listed in the following table are available for any monitoring-enabled compute instance. You must enable monitoring on the instance to get these metrics.
The metrics in this namespace are aggregated across all the related resources on the instance. For example, DiskBytesRead
is aggregated across all the instance's attached storage volumes, and NetworkBytesIn
is aggregated across all the instance's attached VNICs.
You also can use the Monitoring service to create custom queries.
Each metric includes the following dimensions
- availabilityDomain
- The availability domain where the instance resides.
- faultDomain
- The fault domain where the instance resides.
- imageId
- The OCID of the image for the instance.
- instancePoolId
- The instance pool that the instance belongs to.
- region
- The region where the instance resides.
- resourceDisplayName
- The friendly name of the instance.
- resourceId
- The OCID of the instance.
- shape
- The shape of the instance.
Metric | Metric Display Name | Unit | Description | Dimensions |
---|---|---|---|---|
CpuUtilization
|
CPU Utilization | percent |
Activity level from CPU. Expressed as a percentage of total time. For instance pools, the value is averaged across all instances in the pool. |
|
DiskBytesRead 1, 3 |
Disk Read Bytes | bytes | Read throughput. Expressed as bytes read per interval. | |
DiskBytesWritten 1, 3 |
Disk Write Bytes | bytes | Write throughput. Expressed as bytes written per interval. | |
DiskIopsRead 1, 3 |
Disk Read I/O | operations | Activity level from I/O reads. Expressed as reads per interval. | |
DiskIopsWritten 1, 3 |
Disk Write I/O | operations | Activity level from I/O writes. Expressed as writes per interval. | |
MemoryUtilization 1
|
Memory Utilization | percent |
Space currently in use. Measured by pages. Expressed as a percentage of used pages. For instance pools, the value is averaged across all instances in the pool. |
|
NetworksBytesIn 1, 2 |
Network Receive Bytes | bytes |
Network receipt throughput. Expressed as bytes received. |
|
NetworksBytesOut 1, 2
|
Network Transmit Bytes | bytes | Network transmission throughput. Expressed as bytes transmitted. | |
1This metric is a cumulative counter that shows monotonically increasing behavior for each session of the Oracle Cloud Agent software, resetting when the operating system is restarted. 2The Networking service provides additional metrics (in the 3The Block Volume service provides additional metrics (in the |
Using the Console
- Open the navigation menu. Under Core Infrastructure, go to Compute and click Instances.
- Click the instance that you're interested in.
- Under Resources, click Metrics.
-
In the Metric Namespace list, select oci_computeagent.
The Metrics page displays a default set of charts for the current instance.
Not seeing any metric charts for the instance?If you don't see any metric charts, the instance might not be emitting metrics. See the following possible causes and resolutions.
Possible cause How to check Resolution The Compute Instance Monitoring plugin is disabled on the instance or plugins are stopped. Review the instance properties. Enable the Compute Instance Monitoring plugin and start all plugins. The instance cannot access the Monitoring service because its VCN does not use the internet. Review the instance's IP address. If it's not public, then a service gateway is needed. Set up a service gateway. The instance does not use a supported image. Review the supported images. Create an instance with a supported image. Older images and custom images: No Oracle Cloud Agent software exists on the instance. Connect to the instance and look for the software. Install the Oracle Cloud Agent software. New instance in a new compartment : The IAM policies required for the instance to publish metrics to Monitoring are not yet initialized.
More information: IAM policies are automatically created for new instances and are immediately available, unless the instances are in a new compartment. For a new instance in a new compartment, the policies can take up to 20 minutes to initialize, which delays the emission of metrics.
(not applicable) Check back after 10 or 20 minutes. For more information about monitoring metrics and using alarms, see Monitoring Overview. For information about notifications for alarms, see Notifications Overview.
- Open the navigation menu. Under Solutions and Platform, go to Monitoring and click Service Metrics.
- Select a compartment.
-
For Metric Namespace, select oci_computeagent.
The Service Metrics page dynamically updates the page to show charts for each metric that is emitted by the selected metric namespace.
For more information about monitoring metrics and using alarms, see Monitoring Overview. For information about notifications for alarms, see Notifications Overview.
- Open the navigation menu. Under Core Infrastructure, go to Compute and click Instance Pools.
- Click the instance pool that you're interested in.
- Under Resources, click Metrics.
-
In the Metric Namespace list, select oci_computeagent.
The Metrics page displays a default set of charts for the current instance pool.
For more information about monitoring metrics and using alarms, see Monitoring Overview. For information about notifications for alarms, see Notifications Overview.
Using the API
For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.
Use the following APIs for monitoring:
- Monitoring API for metrics and alarms
- Notifications API for notifications (used with alarms)