AWS EC2

Amazon Elastic Compute Cloud (EC2) forms a central part of Amazon.com´s cloud-computing platform, Amazon Web Services (AWS), by allowing users to rent virtual computers on which to run their own computer applications.

Available solutions




This template is for Zabbix version: 6.2

Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/cloud/AWS/aws_ec2_http?at=release/6.2

AWS EC2 by HTTP

Overview

For Zabbix version: 6.2 and higher
The template to monitor AWS EC2 and attached AWS EBS volumes by HTTP via Zabbix that works without any external scripts.
Most of the metrics are collected in one go, thanks to Zabbix bulk data collection. NOTE This template uses the GetMetricData CloudWatch API calls to list and retrieve metrics. For more information, please refer to the (CloudWatch pricing)[https://aws.amazon.com/cloudwatch/pricing/] page.

Additional information about metrics and used API methods:

Setup

See Zabbix template operation for basic instructions.

The template get AWS EC2 and attached AWS EBS volumes metrics and uses the script item to make HTTP requests to the CloudWatch API.

Before using template, you need to create an IAM policy for the Zabbix role in your AWS account with the necessary permissions.

Add the following required permissions to your Zabbix IAM policy in order to collect Amazon EC2 metrics.

{
    "Version":"2012-10-17",
    "Statement":[
        {
          "Action":[
              "cloudwatch:Describe*",
              "cloudwatch:Get*",
              "cloudwatch:List*",
              "ec2:Describe*"
          ],
          "Effect":"Allow",
          "Resource":"*"
        }
    ]
  }

For more information, see the EC2 policies on the AWS website.

Set macros "{$AWS.ACCESS.KEY.ID}", "{$AWS.SECRET.ACCESS.KEY}", "{$AWS.REGION}", "{$AWS.EC2.INSTANCE.ID}"

For more information about manage access keys, see official documentation

Also, see the Macros section for a list of macros used to LLD filters.

Additional information about metrics and used API methods:

Zabbix configuration

No specific Zabbix configuration is required.

Macros used

Name Description Default
{$AWS.ACCESS.KEY.ID}

Access key ID.

``
{$AWS.EBS.BURST.CREDIT.BALANCE.MIN.WARN}

Minimum percentage of Byte credits remaining for trigger expression.

20
{$AWS.EBS.BYTE.CREDIT.BALANCE.MIN.WARN}

Minimum percentage of Byte credits remaining for trigger expression.

20
{$AWS.EBS.IO.CREDIT.BALANCE.MIN.WARN}

Minimum percentage of I/O credits remaining for trigger expression.

20
{$AWS.EC2.CPU.CREDIT.BALANCE.MIN.WARN}

Minimum number of free earned CPU credits for trigger expression.

50
{$AWS.EC2.CPU.CREDIT.SURPLUS.BALANCE.MAX.WARN}

Maximum number of spent CPU Surplus credits for trigger expression.

100
{$AWS.EC2.CPU.UTIL.WARN.MAX}

The warning threshold of the CPU utilization in %.

85
{$AWS.EC2.INSTANCE.ID}

EC2 instance ID.

``
{$AWS.EC2.LLD.FILTER.ALARM_NAME.MATCHES}

Filter of discoverable alarms by namespace.

.*
{$AWS.EC2.LLD.FILTER.ALARM_NAME.NOT_MATCHES}

Filter to exclude discovered alarms by namespace.

CHANGE_IF_NEEDED
{$AWS.EC2.LLD.FILTER.ALARM_SERVICE_NAMESPACE.MATCHES}

Filter of discoverable alarms by namespace.

.*
{$AWS.EC2.LLD.FILTER.ALARM_SERVICE_NAMESPACE.NOT_MATCHES}

Filter to exclude discovered alarms by namespace.

CHANGE_IF_NEEDED
{$AWS.EC2.LLD.FILTER.VOLUME_TYPE.MATCHES}

Filter of discoverable volumes by type.

.*
{$AWS.EC2.LLD.FILTER.VOLUME_TYPE.NOT_MATCHES}

Filter to exclude discovered volumes by type.

CHANGE_IF_NEEDED
{$AWS.REGION}

Amazon EC2 Region code.

us-west-1
{$AWS.SECRET.ACCESS.KEY}

Secret access key.

``

Template links

There are no template links in this template.

Discovery rules

Name Description Type Key and additional info
Instance Alarms discovery

Discovery instance and attached EBS volumes alarms.

DEPENDENT aws.ec2.alarms.discovery

Preprocessing:

- JAVASCRIPT: The text is too long. Please see the template.

- DISCARD_UNCHANGED_HEARTBEAT: 3h

Filter:

AND

- {#ALARM_SERVICE_NAMESPACE} MATCHES_REGEX {$AWS.EC2.LLD.FILTER.ALARM_SERVICE_NAMESPACE.MATCHES}

- {#ALARM_SERVICE_NAMESPACE} NOT_MATCHES_REGEX {$AWS.EC2.LLD.FILTER.ALARM_SERVICE_NAMESPACE.NOT_MATCHES}

- {#ALARM_NAME} MATCHES_REGEX {$AWS.EC2.LLD.FILTER.ALARM_NAME.MATCHES}

- {#ALARM_NAME} NOT_MATCHES_REGEX {$AWS.EC2.LLD.FILTER.ALARM_NAME.NOT_MATCHES}

Instance Volumes discovery

Discovery attached EBS volumes.

DEPENDENT aws.ec2.volumes.discovery

Preprocessing:

- JAVASCRIPT: The text is too long. Please see the template.

- DISCARD_UNCHANGED_HEARTBEAT: 3h

Filter:

AND

- {#VOLUME_TYPE} MATCHES_REGEX {$AWS.EC2.LLD.FILTER.VOLUME_TYPE.MATCHES}

- {#VOLUME_TYPE} NOT_MATCHES_REGEX {$AWS.EC2.LLD.FILTER.VOLUME_TYPE.NOT_MATCHES}

Items collected

Group Name Description Type Key and additional info
AWS EC2 AWS EC2: Get metrics check

Data collection check.

DEPENDENT aws.ec2.metrics.check

Preprocessing:

- JSONPATH: $.error

⛔️ON_FAIL: CUSTOM_VALUE ->

- DISCARD_UNCHANGED_HEARTBEAT: 3h

AWS EC2 AWS EC2: Get alarms check

Data collection check.

DEPENDENT aws.ec2.alarms.check

Preprocessing:

- JSONPATH: $.error

⛔️ON_FAIL: CUSTOM_VALUE ->

- DISCARD_UNCHANGED_HEARTBEAT: 3h

AWS EC2 AWS EC2: Get volumes info check

Data collection check.

DEPENDENT aws.ec2.volumes.check

Preprocessing:

- JSONPATH: $.error

⛔️ON_FAIL: CUSTOM_VALUE ->

- DISCARD_UNCHANGED_HEARTBEAT: 3h

AWS EC2 AWS EC2: Credit CPU: Balance

The number of earned CPU credits that an instance has accrued since it was launched or started. For T2 Standard, the CPUCreditBalance also includes the number of launch credits that have been accrued.

Credits are accrued in the credit balance after they are earned, and removed from the credit balance when they are spent. The credit balance has a maximum limit, determined by the instance size. After the limit is reached, any new credits that are earned are discarded. For T2 Standard, launch credits do not count towards the limit.

The credits in the CPUCreditBalance are available for the instance to spend to burst beyond its baseline CPU utilization.

When an instance is running, credits in the CPUCreditBalance do not expire. When a T3 or T3a instance stops, the CPUCreditBalance value persists for seven days. Thereafter, all accrued credits are lost. When a T2 instance stops, the CPUCreditBalance value does not persist, and all accrued credits are lost.

DEPENDENT aws.ec2.cpu.credit_balance

Preprocessing:

- JSONPATH: $.[?(@.Label == "CPUCreditBalance")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

AWS EC2 AWS EC2: Credit CPU: Usage

The number of CPU credits spent by the instance for CPU utilization.

One CPU credit equals one vCPU running at 100% utilization for one minute or an equivalent combination of vCPUs, utilization, and time (for example, one vCPU running at 50% utilization for two minutes or two vCPUs running at 25% utilization for two minutes).

DEPENDENT aws.ec2.cpu.credit_usage

Preprocessing:

- JSONPATH: $.[?(@.Label == "CPUCreditUsage")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

AWS EC2 AWS EC2: Credit CPU: Surplus balance

The number of surplus credits that have been spent by an unlimited instance when its CPUCreditBalance value is zero.

The CPUSurplusCreditBalance value is paid down by earned CPU credits. If the number of surplus credits exceeds the maximum number of credits that the instance can earn in a 24-hour period, the spent surplus credits above the maximum incur an additional charge.

DEPENDENT aws.ec2.cpu.surplus_credit_balance

Preprocessing:

- JSONPATH: $.[?(@.Label == "CPUSurplusCreditBalance")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

AWS EC2 AWS EC2: Credit CPU: Surplus charged

The number of spent surplus credits that are not paid down by earned CPU credits, and which thus incur an additional charge.

Spent surplus credits are charged when any of the following occurs:

- The spent surplus credits exceed the maximum number of credits that the instance can earn in a 24-hour period. Spent surplus credits above the maximum are charged at the end of the hour;

- The instance is stopped or terminated;

- The instance is switched from unlimited to standard.

DEPENDENT aws.ec2.cpu.surplus_credit_charged

Preprocessing:

- JSONPATH: $.[?(@.Label == "CPUSurplusCreditsCharged")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

AWS EC2 AWS EC2: CPU: Utilization

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 on a selected instance.

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

DEPENDENT aws.ec2.cpu_utilization

Preprocessing:

- JSONPATH: $.[?(@.Label == "CPUUtilization")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

AWS EC2 AWS EC2: Disk: Read bytes, rate

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.

If there are no instance store volumes, either the value is 0 or the metric is not reported.

DEPENDENT aws.ec2.disk.read_bytes.rate

Preprocessing:

- JSONPATH: $.[?(@.Label == "DiskReadBytes")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

- JAVASCRIPT: return value / 300

AWS EC2 AWS EC2: Disk: Read, rate

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

If there are no instance store volumes, either the value is 0 or the metric is not reported.

DEPENDENT aws.ec2.disk.read_ops.rate

Preprocessing:

- JSONPATH: $.[?(@.Label == "DiskReadOps")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

- JAVASCRIPT: return value / 300

AWS EC2 AWS EC2: Disk: Write bytes, rate

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.

If there are no instance store volumes, either the value is 0 or the metric is not reported.

DEPENDENT aws.ec2.disk_write_bytes.rate

Preprocessing:

- JSONPATH: $.[?(@.Label == "DiskWriteBytes")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

- JAVASCRIPT: return value / 300

AWS EC2 AWS EC2: Disk: Write ops, rate

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

If there are no instance store volumes, either the value is 0 or the metric is not reported.

DEPENDENT aws.ec2.disk_write_ops.rate

Preprocessing:

- JSONPATH: $.[?(@.Label == "DiskWriteOps")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

- JAVASCRIPT: return value / 300

AWS EC2 AWS EC2: EBS: Byte balance

Percentage of throughput credits remaining in the burst bucket for Nitro-based instances.

DEPENDENT aws.ec2.ebs.byte_balance

Preprocessing:

- JSONPATH: $.[?(@.Label == "EBSByteBalance%")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

AWS EC2 AWS EC2: EBS: IO balance

Percentage of I/O credits remaining in the burst bucket for Nitro-based instances.

DEPENDENT aws.ec2.ebs.io_balance

Preprocessing:

- JSONPATH: $.[?(@.Label == "EBSIOBalance%")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

AWS EC2 AWS EC2: EBS: Read bytes, rate

Bytes read from all EBS volumes attached to the instance for Nitro-based instances.

DEPENDENT aws.ec2.ebs.read_bytes.rate

Preprocessing:

- JSONPATH: $.[?(@.Label == "EBSReadBytes")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

- JAVASCRIPT: return value/300

AWS EC2 AWS EC2: EBS: Read, rate

Completed read operations from all Amazon EBS volumes attached to the instance for Nitro-based instances.

DEPENDENT aws.ec2.ebs.read_ops.rate

Preprocessing:

- JSONPATH: $.[?(@.Label == "EBSReadOps")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

- JAVASCRIPT: return value / 300

AWS EC2 AWS EC2: EBS: Write bytes, rate

Bytes written to all EBS volumes attached to the instance for Nitro-based instances.

DEPENDENT aws.ec2.ebs.write_bytes.rate

Preprocessing:

- JSONPATH: $.[?(@.Label == "EBSWriteBytes")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

- JAVASCRIPT: return value/300

AWS EC2 AWS EC2: EBS: Write, rate

Completed write operations to all EBS volumes attached to the instance in a specified period of time.

DEPENDENT aws.ec2.ebs.write_ops.rate

Preprocessing:

- JSONPATH: $.[?(@.Label == "EBSWriteOps")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

- JAVASCRIPT: return value / 300

AWS EC2 AWS EC2: Metadata: No token

The number of times the instance metadata service was successfully accessed using a method that does not use a token.

This metric is used to determine if there are any processes accessing instance metadata that are using Instance Metadata Service Version 1, which does not use a token.

If all requests use token-backed sessions, i.e., Instance Metadata Service Version 2, the value is 0.

DEPENDENT aws.ec2.metadata.no_token

Preprocessing:

- JSONPATH: $.[?(@.Label == "MetadataNoToken")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

AWS EC2 AWS EC2: Network: Bytes in, rate

The number of bytes received on all network interfaces by the instance.

This metric identifies the volume of incoming network traffic to a single instance.

DEPENDENT aws.ec2.network_in.rate

Preprocessing:

- JSONPATH: $.[?(@.Label == "NetworkIn")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

- JAVASCRIPT: return value / 300

AWS EC2 AWS EC2: Network: Bytes out, rate

The number of bytes sent out on all network interfaces by the instance.

This metric identifies the volume of outgoing network traffic from a single instance.

DEPENDENT aws.ec2.network_out.rate

Preprocessing:

- JSONPATH: $.[?(@.Label == "NetworkOut")].Values.first().first()

- JAVASCRIPT: return value / 300

AWS EC2 AWS EC2: Network: Packets in, rate

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.

DEPENDENT aws.ec2.packets_in.rate

Preprocessing:

- JSONPATH: $.[?(@.Label == "NetworkPacketsIn")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

- JAVASCRIPT: return value / 300

AWS EC2 AWS EC2: Network: Packets out, rate

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.

DEPENDENT aws.ec2.packets_out.rate

Preprocessing:

- JSONPATH: $.[?(@.Label == "NetworkPacketsOut")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

- JAVASCRIPT: return value / 300

AWS EC2 AWS EC2: Status: Check failed

Reports whether the instance has passed both the instance status check and the system status check in the last minute.

This metric can be either 0 (passed) or 1 (failed).

DEPENDENT aws.ec2.status_check_failed

Preprocessing:

- JSONPATH: $.[?(@.Label == "StatusCheckFailed")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

AWS EC2 AWS EC2: Status: Check failed, instance

Reports whether the instance has passed the instance status check in the last minute.

This metric can be either 0 (passed) or 1 (failed).

DEPENDENT aws.ec2.status_check_failed_instance

Preprocessing:

- JSONPATH: $.[?(@.Label == "StatusCheckFailed_Instance")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

AWS EC2 AWS EC2: Status: Check failed, system

Reports whether the instance has passed the system status check in the last minute.

This metric can be either 0 (passed) or 1 (failed).

DEPENDENT aws.ec2.status_check_failed_system

Preprocessing:

- JSONPATH: $.[?(@.Label == "StatusCheckFailed_System")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

AWS EC2 AWS EC2 Alarms: ["{#ALARM_NAME}"]: State reason

An explanation for the alarm state, in text format.

Alarm description:

{#ALARM_DESCRIPTION}

DEPENDENT aws.ec2.alarm.state_reason["{#ALARM_NAME}"]

Preprocessing:

- JSONPATH: $.[?(@.AlarmName == "{#ALARM_NAME}")].StateReason.first()

⛔️ON_FAIL: DISCARD_VALUE ->

- DISCARD_UNCHANGED_HEARTBEAT: 3h

AWS EC2 AWS EC2 Alarms: ["{#ALARM_NAME}"]: State

The state value for the alarm. Possible values: 0 (OK), 1 (INSUFFICIENT_DATA), 2 (ALARM).

Alarm description:

{#ALARM_DESCRIPTION}

DEPENDENT aws.ec2.alarm.state["{#ALARM_NAME}"]

Preprocessing:

- JSONPATH: $.[?(@.AlarmName == "{#ALARM_NAME}")].StateValue.first()

⛔️ON_FAIL: CUSTOM_VALUE -> 3

- JAVASCRIPT: var state = ['OK', 'INSUFFICIENT_DATA', 'ALARM']; return state.indexOf(value.trim()) === -1 ? 255 : state.indexOf(value.trim());

AWS EC2 AWS EBS: ["{#VOLUME_ID}"]: Create time

The time stamp when volume creation was initiated.

DEPENDENT aws.ec2.ebs.create_time["{#VOLUME_ID}"]

Preprocessing:

- JSONPATH: $.[?(@.volumeId == "{#VOLUME_ID}")].createTime.first()

⛔️ON_FAIL: DISCARD_VALUE ->

- DISCARD_UNCHANGED_HEARTBEAT: 3h

AWS EC2 AWS EBS: ["{#VOLUME_ID}"]: Status

The state of the volume.

Possible values: 0 (creating), 1 (available), 2 (in-use), 3 (deleting), 4 (deleted), 5 (error).

DEPENDENT aws.ec2.ebs.status["{#VOLUME_ID}"]

Preprocessing:

- JSONPATH: $.[?(@.volumeId == "{#VOLUME_ID}")].status.first()

⛔️ON_FAIL: DISCARD_VALUE ->

- JAVASCRIPT: var state = ['creating', 'available', 'in-use', 'deleting', 'deleted', 'error']; return state.indexOf(value.trim()) === -1 ? 255 : state.indexOf(value.trim());

- DISCARD_UNCHANGED_HEARTBEAT: 3h

AWS EC2 AWS EBS: ["{#VOLUME_ID}"]: Attachment state

The attachment state of the volume. Possible values: 0 (attaching), 1 (attached), 2 (detaching).

DEPENDENT aws.ec2.ebs.attachment_status["{#VOLUME_ID}"]

Preprocessing:

- JSONPATH: $.[?(@.volumeId == "{#VOLUME_ID}")].attachmentSet..[?(@.instanceId == "{$AWS.EC2.INSTANCE.ID}")].status.first()

⛔️ON_FAIL: DISCARD_VALUE ->

- JAVASCRIPT: var state = ['attaching', 'attached', 'detaching']; return state.indexOf(value.trim()) === -1 ? 255 : state.indexOf(value.trim());

- DISCARD_UNCHANGED_HEARTBEAT: 3h

AWS EC2 AWS EBS: ["{#VOLUME_ID}"]: Attachment time

The time stamp when the attachment initiated.

DEPENDENT aws.ec2.ebs.attachment_time["{#VOLUME_ID}"]

Preprocessing:

- JSONPATH: $.[?(@.volumeId == "{#VOLUME_ID}")].attachmentSet..[?(@.instanceId == "{$AWS.EC2.INSTANCE.ID}")].attachTime.first()

⛔️ON_FAIL: DISCARD_VALUE ->

- DISCARD_UNCHANGED_HEARTBEAT: 3h

AWS EC2 AWS EBS: ["{#VOLUME_ID}"]: Device

The device name specified in the block device mapping (for example, /dev/sda1).

DEPENDENT aws.ec2.ebs.device["{#VOLUME_ID}"]

Preprocessing:

- JSONPATH: $.[?(@.volumeId == "{#VOLUME_ID}")].attachmentSet..[?(@.instanceId == "{$AWS.EC2.INSTANCE.ID}")].device.first()

⛔️ON_FAIL: DISCARD_VALUE ->

- DISCARD_UNCHANGED_HEARTBEAT: 3h

AWS EC2 AWS EBS: ["{#VOLUME_ID}"]: Read, bytes

Provides information on the read operations in a specified period of time.

The average size of each read operation during the period, except on volumes attached to a Nitro-based instance, where the average represents the average over the specified period.

For Xen instances, data is reported only when there is read activity on the volume.

DEPENDENT aws.ec2.ebs.volume.read_bytes["{#VOLUME_ID}"]

Preprocessing:

- JSONPATH: $.[?(@.Label == "VolumeReadBytes")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

AWS EC2 AWS EBS: ["{#VOLUME_ID}"]: Write, bytes

Provides information on the write operations in a specified period of time.

The average size of each write operation during the period, except on volumes attached to a Nitro-based instance, where the average represents the average over the specified period.

For Xen instances, data is reported only when there is write activity on the volume.

DEPENDENT aws.ec2.ebs.volume.write_bytes["{#VOLUME_ID}"]

Preprocessing:

- JSONPATH: $.[?(@.Label == "VolumeWriteBytes")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

AWS EC2 AWS EBS: ["{#VOLUME_ID}"]: Write, ops

The total number of write operations in a specified period of time. Note: write operations are counted on completion.

DEPENDENT aws.ec2.ebs.volume.write_ops["{#VOLUME_ID}"]

Preprocessing:

- JSONPATH: $.[?(@.Label == "VolumeWriteOps")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

AWS EC2 AWS EBS: ["{#VOLUME_ID}"]: Read, ops

The total number of read operations in a specified period of time. Note: read operations are counted on completion.

DEPENDENT aws.ec2.ebs.volume.read_ops["{#VOLUME_ID}"]

Preprocessing:

- JSONPATH: $.[?(@.Label == "VolumeReadOps")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

AWS EC2 AWS EBS: ["{#VOLUME_ID}"]: Read time, total

This metric is not supported with Multi-Attach enabled volumes.

The total number of seconds spent by all read operations that completed in a specified period of time.

If multiple requests are submitted at the same time, this total could be greater than the length of the period.

For example, for a period of 1 minutes (60 seconds): if 150 operations completed during that period, and each operation took 1 second, the value would be 150 seconds.

For Xen instances, data is reported only when there is read activity on the volume.

DEPENDENT aws.ec2.ebs.volume.total_read_time["{#VOLUME_ID}"]

Preprocessing:

- JSONPATH: $.[?(@.Label == "VolumeTotalReadTime")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

AWS EC2 AWS EBS: ["{#VOLUME_ID}"]: Write time, total

This metric is not supported with Multi-Attach enabled volumes.

The total number of seconds spent by all write operations that completed in a specified period of time.

If multiple requests are submitted at the same time, this total could be greater than the length of the period.

For example, for a period of 1 minute (60 seconds): if 150 operations completed during that period, and each operation took 1 second, the value would be 150 seconds.

For Xen instances, data is reported only when there is write activity on the volume.

DEPENDENT aws.ec2.ebs.volume.total_write_time["{#VOLUME_ID}"]

Preprocessing:

- JSONPATH: $.[?(@.Label == "VolumeTotalWriteTime")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

AWS EC2 AWS EBS: ["{#VOLUME_ID}"]: Idle time

This metric is not supported with Multi-Attach enabled volumes.

The total number of seconds in a specified period of time when no read or write operations were submitted.

DEPENDENT aws.ec2.ebs.volume.idle_time["{#VOLUME_ID}"]

Preprocessing:

- JSONPATH: $.[?(@.Label == "VolumeIdleTime")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

AWS EC2 AWS EBS: ["{#VOLUME_ID}"]: Queue length

The number of read and write operation requests waiting to be completed in a specified period of time.

DEPENDENT aws.ec2.ebs.volume.queue_length["{#VOLUME_ID}"]

Preprocessing:

- JSONPATH: $.[?(@.Label == "VolumeQueueLength")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

AWS EC2 AWS EBS: ["{#VOLUME_ID}"]: Throughput, pct

This metric is not supported with Multi-Attach enabled volumes.

Used with Provisioned IOPS SSD volumes only. The percentage of I/O operations per second (IOPS) delivered of the total IOPS provisioned for an Amazon EBS volume.

Provisioned IOPS SSD volumes deliver their provisioned performance 99.9 percent of the time.

During a write, if there are no other pending I/O requests in a minute, the metric value will be 100 percent.

Also, a volume's I/O performance may become degraded temporarily due to an action you have taken (for example, creating a snapshot of a volume during peak usage, running the volume on a non-EBS-optimized instance, or accessing data on the volume for the first time).

DEPENDENT aws.ec2.ebs.volume.throughput_percentage["{#VOLUME_ID}"]

Preprocessing:

- JSONPATH: $.[?(@.Label == "VolumeThroughputPercentage")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

AWS EC2 AWS EBS: ["{#VOLUME_ID}"]: Consumed Read/Write, ops

Used with Provisioned IOPS SSD volumes only.

The total amount of read and write operations (normalized to 256K capacity units) consumed in a specified period of time.

I/O operations that are smaller than 256K each count as 1 consumed IOPS. I/O operations that are larger than 256K are counted in 256K capacity units.

For example, a 1024K I/O would count as 4 consumed IOPS.

DEPENDENT aws.ec2.ebs.volume.consumed_read_write_ops["{#VOLUME_ID}"]

Preprocessing:

- JSONPATH: $.[?(@.Label == "VolumeConsumedReadWriteOps")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

AWS EC2 AWS EBS: ["{#VOLUME_ID}"]: Burst balance

Used with General Purpose SSD (gp2), Throughput Optimized HDD (st1), and Cold HDD (sc1) volumes only.

Provides information about the percentage of I/O credits (for gp2) or throughput credits (for st1 and sc1) remaining in the burst bucket.

Data is reported to CloudWatch only when the volume is active. If the volume is not attached, no data is reported.

DEPENDENT aws.ec2.ebs.volume.burst_balance["{#VOLUME_ID}"]

Preprocessing:

- JSONPATH: $.[?(@.Label == "VolumeConsumedReadWriteOps")].Values.first().first()

⛔️ON_FAIL: DISCARD_VALUE ->

Zabbix raw items AWS EC2: Get metrics data

Get instance metrics.

Full metrics list related to EC2: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/viewing_metrics_with_cloudwatch.html

SCRIPT aws.ec2.get_metrics

Preprocessing:

- CHECK_NOT_SUPPORTED

⛔️ON_FAIL: DISCARD_VALUE ->

Expression:

The text is too long. Please see the template.
Zabbix raw items AWS CloudWatch: Get instance alarms data

DescribeAlarms API method: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarms.html

SCRIPT aws.ec2.get_alarms

Preprocessing:

- CHECK_NOT_SUPPORTED

⛔️ON_FAIL: DISCARD_VALUE ->

Expression:

The text is too long. Please see the template.
Zabbix raw items AWS EBS: Get volumes data

Get volumes attached to instance.

DescribeVolumes API method: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVolumes.html

SCRIPT aws.ec2.get_volumes

Preprocessing:

- CHECK_NOT_SUPPORTED

⛔️ON_FAIL: DISCARD_VALUE ->

Expression:

The text is too long. Please see the template.
Zabbix raw items AWS EBS: ["{#VOLUME_ID}"]: Get metrics

Get metrics of EBS volume.

Full metrics list related to EBS: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cloudwatch_ebs.html

SCRIPT aws.ec2.get_ebs_metrics["{#VOLUME_ID}"]

Preprocessing:

- CHECK_NOT_SUPPORTED

⛔️ON_FAIL: DISCARD_VALUE ->

Expression:

The text is too long. Please see the template.

Triggers

Name Description Expression Severity Dependencies and additional info
AWS EC2: Failed to get metrics data

-

length(last(/AWS EC2 by HTTP/aws.ec2.metrics.check))>0 WARNING
AWS EC2: Failed to get alarms data

-

length(last(/AWS EC2 by HTTP/aws.ec2.alarms.check))>0 WARNING
AWS EC2: Failed to get volumes info

-

length(last(/AWS EC2 by HTTP/aws.ec2.volumes.check))>0 WARNING
AWS EC2: Instance CPU Credit balance is too low

The number of earned CPU credits has been less than {$AWS.EC2.CPU.CREDIT.BALANCE.MIN.WARN} in the last 5 minutes.

max(/AWS EC2 by HTTP/aws.ec2.cpu.credit_balance,5m)<{$AWS.EC2.CPU.CREDIT.BALANCE.MIN.WARN} WARNING
AWS EC2: Instance has spent too many CPU surplus credits

The number of spent surplus credits that are not paid down and which thus incur an additional charge is over {$AWS.EC2.CPU.CREDIT.SURPLUS.BALANCE.MAX.WARN}.

last(/AWS EC2 by HTTP/aws.ec2.cpu.surplus_credit_charged)>{$AWS.EC2.CPU.CREDIT.SURPLUS.BALANCE.MAX.WARN} WARNING
AWS EC2: High CPU utilization

CPU utilization is too high. The system might be slow to respond.

min(/AWS EC2 by HTTP/aws.ec2.cpu_utilization,15m)>{$AWS.EC2.CPU.UTIL.WARN.MAX} WARNING
AWS EC2: Byte Credit balance is too low

-

max(/AWS EC2 by HTTP/aws.ec2.ebs.byte_balance,5m)<{$AWS.EBS.BYTE.CREDIT.BALANCE.MIN.WARN} WARNING
AWS EC2: I/O Credit balance is too low

-

max(/AWS EC2 by HTTP/aws.ec2.ebs.io_balance,5m)<{$AWS.EBS.IO.CREDIT.BALANCE.MIN.WARN} WARNING
AWS EC2: Instance status check failed

These checks detect problems that require your involvement to repair.

The following are examples of problems that can cause instance status checks to fail:

Failed system status checks

Incorrect networking or startup configuration

Exhausted memory

Corrupted file system

Incompatible kernel

last(/AWS EC2 by HTTP/aws.ec2.status_check_failed_instance)=1 AVERAGE
AWS EC2: System status check failed

These checks detect underlying problems with your instance that require AWS involvement to repair.

The following are examples of problems that can cause system status checks to fail:

Loss of network connectivity

Loss of system power

Software issues on the physical host

Hardware issues on the physical host that impact network reachability

last(/AWS EC2 by HTTP/aws.ec2.status_check_failed_system)=1 AVERAGE
AWS EC2 Alarms: "{#ALARM_NAME}" has 'Alarm' state

Alarm "{#ALARM_NAME}" has 'Alarm' state.

Reason: {ITEM.LASTVALUE2}

last(/AWS EC2 by HTTP/aws.ec2.alarm.state["{#ALARM_NAME}"])=2 and length(last(/AWS EC2 by HTTP/aws.ec2.alarm.state_reason["{#ALARM_NAME}"]))>0 AVERAGE
AWS EC2 Alarms: "{#ALARM_NAME}" has 'Insufficient data' state

-

last(/AWS EC2 by HTTP/aws.ec2.alarm.state["{#ALARM_NAME}"])=1 INFO
AWS EBS: Volume "{#VOLUME_ID}" has 'error' state

-

last(/AWS EC2 by HTTP/aws.ec2.ebs.status["{#VOLUME_ID}"])=5 WARNING
AWS EBS: Burst balance is too low

-

max(/AWS EC2 by HTTP/aws.ec2.ebs.volume.burst_balance["{#VOLUME_ID}"],5m)<{$AWS.EBS.BURST.CREDIT.BALANCE.MIN.WARN} WARNING

Feedback

Please report any issues with the template at https://support.zabbix.com

You can also provide feedback, discuss the template or ask for help with it at ZABBIX forums.

Articles and documentation

+ Propose new article

Didn't find what you are looking for?