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 Oracle Cloud Agent software 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.

This image shows the types of metrics available for an instance and related components.

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.

See Available Metrics: oci_computeagent.

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, Compute instances must be monitoring-enabled. Oracle Cloud Agent software installation may also be required. 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 instances 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.

availabilityDomain

faultDomain

imageId

instancePoolId

region

resourceDisplayName

resourceId

shape

DiskBytesRead1, 3 Disk Read Bytes bytes Read throughput. Expressed as bytes read per interval.
DiskBytesWritten1, 3 Disk Write Bytes bytes Write throughput. Expressed as bytes written per interval.
DiskIopsRead1, 3 Disk Read I/O operations Activity level from I/O reads. Expressed as reads per interval.
DiskIopsWritten1, 3 Disk Write I/O operations Activity level from I/O writes. Expressed as writes per interval.
MemoryUtilization1 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.

NetworksBytesIn1, 2 Network Receive Bytes bytes

Network receipt throughput. Expressed as bytes received.

NetworksBytesOut1, 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 oci_vcn metric namespace) for each VNIC on the instance. For more information, see Networking Metrics.

3The Block Volume service provides additional metrics (in the oci_blockstore metric namespace) for each volume attached to the instance. For more information, see Block Volume Metrics.

Using the Console

To view default metric charts for a single Compute instance
  1. Open the navigation menu. Under Core Infrastructure, go to Compute and click Instances.
  2. Click the instance that you're interested in.
  3. Under Resources, click Metrics.
  4. 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, your Compute instance might not be emitting metrics. See the following possible causes and resolutions.

    Possible cause How to check Resolution
    Monitoring is disabled on the instance. Review the instance configuration. Enable monitoring.
    No Oracle Cloud Agent software exists on the instance (occurs with older images). Connect to the instance and look for the software. Install the software.
    The instance cannot access theMonitoring 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 Supported Images. Create an instance with a supported image.

    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.

To view default metric charts for resources related to a Compute instance
To view default metric charts for all Compute instances in a compartment
  1. Open the navigation menu. Under Solutions and Platform, go to Monitoring and click Service Metrics.
  2. Select a compartment.
  3. 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.

To view default metric charts for the instances in an instance pool
  1. Open the navigation menu. Under Core Infrastructure, go to Compute and click Instance Pools.
  2. Click the instance pool that you're interested in.
  3. Under Resources, click Metrics.

    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.