Menu
Amazon Elastic Compute Cloud
User Guide for Linux Instances

List the Available CloudWatch Metrics for Your Instances

Amazon EC2 sends metrics to Amazon CloudWatch. You can use the AWS Management Console, the AWS CLI, or an API to list the metrics that Amazon EC2 sends to CloudWatch. By default, each data point covers the previous 5 minutes of activity for the instance. If you've enabled detailed monitoring, each data point covers the previous 1 minute of activity.

For information about getting the statistics for these metrics, see Get Statistics for Metrics for Your Instances.

Instance Metrics

The following table describes the metrics for your instances. For information about the metrics provided for your EBS volumes, see Amazon EBS Metrics. For information about the metrics provided for your Spot fleets, see CloudWatch Metrics for Spot Fleet.

MetricDescription

CPUCreditUsage

(Only valid for T2 instances) The number of CPU credits consumed during the specified period.

This metric identifies the amount of time during which physical CPUs were used for processing instructions by virtual CPUs allocated to the instance.

Note

CPU Credit metrics are available at a 5 minute frequency.

Units: Count

CPUCreditBalance

(Only valid for T2 instances) The number of CPU credits that an instance has accumulated.

This metric is used to determine how long an instance can burst beyond its baseline performance level at a given rate.

Note

CPU Credit metrics are available at a 5 minute frequency.

Units: Count

CPUUtilization

The percentage of allocated EC2 compute units that are currently in use on the instance. This metric identifies the processing power required to run an application upon a selected instance.

Note

Depending on the instance type, tools in your operating system may show a lower percentage than CloudWatch when the instance is not allocated a full processor core.

Units: Percent

DiskReadOps

Completed read operations from all instance store volumes available to the instance in a specified period of time.

Note

To calculate the average I/O operations per second (IOPS) for the period, divide the total operations in the period by the number of seconds in that period.

Units: Count

DiskWriteOps

Completed write operations to all instance store volumes available to the instance in a specified period of time.

Note

To calculate the average I/O operations per second (IOPS) for the period, divide the total operations in the period by the number of seconds in that period.

Units: Count

DiskReadBytes

Bytes read from all instance store volumes available to the instance.

This metric is used to determine the volume of the data the application reads from the hard disk of the instance. This can be used to determine the speed of the application.

Units: Bytes

DiskWriteBytes

Bytes written to all instance store volumes available to the instance.

This metric is used to determine the volume of the data the application writes onto the hard disk of the instance. This can be used to determine the speed of the application.

Units: Bytes

NetworkIn

The number of bytes received on all network interfaces by the instance. This metric identifies the volume of incoming network traffic to an application on a single instance.

Units: Bytes

NetworkOut

The number of bytes sent out on all network interfaces by the instance. This metric identifies the volume of outgoing network traffic to an application on a single instance.

Units: Bytes

NetworkPacketsIn

The number of packets received on all network interfaces by the instance. This metric identifies the volume of incoming traffic in terms of the number of packets on a single instance. This metric is available for basic monitoring only.

Units: Count

Statistics: Minimum, Maximum, Average

NetworkPacketsOut

The number of packets sent out on all network interfaces by the instance. This metric identifies the volume of outgoing traffic in terms of the number of packets on a single instance. This metric is available for basic monitoring only.

Units: Count

Statistics: Minimum, Maximum, Average

StatusCheckFailed

A combination of StatusCheckFailed_Instance and StatusCheckFailed_System that reports if either of the status checks has failed. Values for this metric are either 0 (zero) or 1 (one.) A zero indicates that the status check passed. A one indicates a status check failure.

Note

Status check metrics are available at 1 minute frequency. For a newly-launched instance, status check metric data is only available after the instance has completed the initialization state. Status check metrics become available within a few minutes of the instance being in the running state.

Units: Count

StatusCheckFailed_Instance

Reports whether the instance has passed the Amazon EC2 instance status check in the last minute. Values for this metric are either 0 (zero) or 1 (one.) A zero indicates that the status check passed. A one indicates a status check failure.

Note

Status check metrics are available at 1 minute frequency. For a newly-launched instance, status check metric data is only available after the instance has completed the initialization state. Status check metrics become available within a few minutes of the instance being in the running state.

Units: Count

StatusCheckFailed_System

Reports whether the instance has passed the EC2 system status check in the last minute. Values for this metric are either 0 (zero) or 1 (one.) A zero indicates that the status check passed. A one indicates a status check failure.

Note

Status check metrics are available at a 1 minute frequency. For a newly-launched instance, status check metric data is only available after the instance has completed the initialization state. Status check metrics become available within a few minutes of the instance being in the running state.

Units: Count

Amazon EC2 Dimensions

You can use the dimensions in the following table to refine the metrics returned for your instances.

Dimension

Description

AutoScalingGroupName

This dimension filters the data you request for all instances in a specified capacity group. An Auto Scaling group is a collection of instances you define if you're using Auto Scaling. This dimension is available only for Amazon EC2 metrics when the instances are in such an Auto Scaling group. Available for instances with Detailed or Basic Monitoring enabled.

ImageId

This dimension filters the data you request for all instances running this Amazon EC2 Amazon Machine Image (AMI). Available for instances with Detailed Monitoring enabled.

InstanceId

This dimension filters the data you request for the identified instance only. This helps you pinpoint an exact instance from which to monitor data.

InstanceType

This dimension filters the data you request for all instances running with this specified instance type. This helps you categorize your data by the type of instance running. For example, you might compare data from an m1.small instance and an m1.large instance to determine which has the better business value for your application. Available for instances with Detailed Monitoring enabled.

Listing Metrics Using the Console

You can view metrics by category. Metrics are grouped first by namespace, and then by the various dimension combinations within each namespace. For example, you can view all metrics provided by Amazon EC2, or metrics grouped by instance ID, instance type, image (AMI) ID, or Auto Scaling group.

To view available metrics by category

  1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/.

  2. If necessary, from the navigation bar, change the region to match the region where you have your instances.

  3. In the navigation pane, click Metrics.

  4. In the CloudWatch Metrics by Category pane, under EC2 Metrics, select Per-Instance Metrics.

    View all metrics by categories
  5. In the upper pane, scroll down to view the full list of metrics.

    Amazon EC2 per instance metrics

Listing Metrics Using the AWS CLI

Use the list-metrics command to list the CloudWatch metrics for your instances.

To list the available metrics across all instances

Specify the AWS/EC2 namespace to limit the results to the metrics sent by Amazon EC2.

$ aws cloudwatch list-metrics --namespace AWS/EC2

The following is example output:

...
    {
        "Namespace": "AWS/EC2",
        "Dimensions": [
            {
                "Name": "InstanceId",
                "Value": "i-1234567890abcdef0"
            }
        ],
        "MetricName": "NetworkOut"
    },
    {
        "Namespace": "AWS/EC2",
        "Dimensions": [
            {
                "Name": "InstanceId",
                "Value": "i-1234567890abcdef0"
            }
        ],
        "MetricName": "CPUUtilization"
    },
    {
        "Namespace": "AWS/EC2",
        "Dimensions": [
            {
                "Name": "InstanceId",
                "Value": "i-1234567890abcdef0"
            }
        ],
        "MetricName": "NetworkIn"
    },
...

To list the available metrics for a specified instance

Specify the AWS/EC2 namespace and the InstanceId dimension to limit the results to metrics sent by Amazon EC2 for the specified instance.

$ aws cloudwatch list-metrics --namespace AWS/EC2 --dimensions Name=InstanceId,Value=i-1234567890abcdef0

To list a metric across all instances

Specify the AWS/EC2 namespace and the metric name to limit the results to the specified metric sent by Amazon EC2.

$ aws cloudwatch list-metrics --namespace AWS/EC2 --metric-name CPUUtilization