You are here

AWS EC2 Monitoring

Download version    6    5

Included in Opsview 5
Included in Opsview 6
check_circle
Opsview Supported

AWS - EC2 CloudWatch Opspack

Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers and send metrics to CloudWatch for your EC2 instances making AWS Monitoring Simple.

What Can You Monitor

Opsview Monitor's AWS EC2 Opspack helps detect issues within your EC2 instance. Opsview provides all of the latest service checks to make sure your EC2 instance is up and running. The EC2 credit usage and balance show the number of CPU credits consumed and available.

Service Checks

Service Check Description
AWS - EC2 - CPU Credit Usage Must be T2 instance. The number of CPU credits consumed
AWS - EC2 - CPU Credit Balance Must be T2 instance. The number of CPU credits available
AWS - EC2 - CPU Utilization The percentage of allocated EC2 units that are in use
AWS - EC2 - Disk Read Ops Must be an instance store volume. The number of completed read operations
AWS - EC2 - Disk Write Ops Must be an instance store volume. The number of completed write operations
AWS - EC2 - Disk Write Bytes Must be an instance store volume. Bytes written to all instance store volumes available to the instance
AWS - EC2 - Disk Read Ops Must be an instance store volume. Bytes read from all instance store volumes available to the instance
AWS - EC2 - Network In The number of bytes received by the instance
AWS - EC2 - Network Out The number of bytes sent out on all network interfaces by the instance
AWS - EC2 - Network Packets In The number of packets received on all network interfaces by the instance
AWS - EC2 - Network Packets Out The number of packets sent out on all network interfaces by the instance
AWS - EC2 - Status Check Failed Reports whether the instance has passed both the instance status check and the system status check

AWS - EC2 CloudWatch Opspack

Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers and send metrics to CloudWatch for your EC2 instances making AWS Monitoring Simple.

What You Can Monitor

Opsview Monitor contains all the performance metrics needed to monitor diagnose and view metrics for your EC2 instance such as CPU utilization, CPU credit usage and more.

By default, you can retrieve metrics with a resolution of 5 minutes free of charge. Users are allowed to enable 1-minute resolution metrics from AWS which incur a cost upon usage and should be enabled through your AWS console. Opsview plugin is able to cater for both resolutions.

Service Checks

Service Check Description Default Threshold Unit of Measurement
AWS/EC2.CPUUtilization Reports the usage of the CPU in percentage, thresholds can be set to get critical and warnings. Warning: 80
Critical: 90
Percentage
AWS/EC2.CPUCreditBalance T2 instances only The number of earned CPU credits that an instance has accrued since it was launched or started. For T2 Standard, the metric also includes the number of launch credits that have been accrued. - Credits
AWS/EC2.CPUCreditUsage T2 instances only 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). - Credits
AWS/EC2.DiskReadOps Completed read operations to all disks in Instance Store volume only. If there are no instance store volumes the metric is either 0 or not reported. Instances with EBS as storage will return Unknown. - Count
AWS/EC2.DiskWriteOps Completed Write operations to all the instance store volumes available to the instance. If there are no instance store volumes the metric is either 0 or not reported. Instances with EBS as storage will return Unknown. - Count
AWS/EC2.DiskWriteBytes Bytes written to all instance store volumes available to the instance. If there are no instance store volumes the metric is either 0 or not reported. Instances with EBS as storage will return Unknown. - Bytes
AWS/EC2.DiskReadBytes Bytes Read from all disks in Instance Store volume only. If there are no instance store volumes the metric is either 0 or not reported. Instances with EBS as storage will return Unknown. - Bytes
AWS/EC2.NetworkIn 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. - Bytes
AWS/EC2.NetworkOut 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. - Bytes
AWS/EC2.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. - Count
AWS/EC2.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. - Count
AWS/EC2.StatusCheckFailed 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). By default, this metric is available at a 1-minute frequency at no charge. - Count

Notes

This Opspack knows when it was last run, so when testing the results in the troubleshoot section, you will need to wait a couple minutes each time you recheck the results. The time frame that is searched for is based around the last time the Opspack ran, so running it too quickly will result in no data being found and the service check going into an unknown.

Prerequisites

There are two ways of adding your authentication credentials to the host. We recommend adding the access key and secret key directly using the variable 'AWS_CLOUDWATCH_AUTHENTICATION'. You can also add the access key and secret key to a file (default /usr/local/nagios/etc/aws_credentials.cfg) in the following format:

[default]
aws_access_key_id = "Your Access Key Id"
aws_secret_access_key = "Your Secret Key Id"

Setup and Configuration

To configure and utilize this Opspack, you need to add the 'Cloud - AWS - CloudWatch' Opspack to the host running the EC2 software. You can supply the Public DNS name of the instance in the host Address or add the instance ID to the 'AWS_CLOUDWATCH_SEARCH_NAME'. If you supply both the Public DNS name and the Instance ID, then add the -p option to the Host Address to activate the mode to check that the public DNS name and instance ID match.

Step 1: Add the host template and if you are using the Public DNS name, add it to the Host Address.

Add host template

Step 2: Add and configure the 'AWS_CLOUDWATCH_AUTHENTICATION' variable with either the file location or the access key and secret key, depending on your preferred way of supplying the access credential. Add the region you hosted in (default eu-west-1). Then add and configure the 'AWS_EC2_INSTANCE_ID' by adding the instance ID if you are using it.

Add variable

Step 3: Reload and view the EC2 statistics.

View output

Setup and Configuration

To configure and utilize this Opspack, you need to add the 'Cloud - AWS - EC2 CloudWatch' Opspack to the host running the EC2 software. The steps illustrated below are using a t2.micro with EBS back storage EC2 instance so the following rules apply.

  1. The Credit Balance and Credit Usage service checks will execute as per the Service Checks table above.
  2. As this is a EBS storage type the Disk Read Bytes, Disk Read Ops, Disk Write Bytes and Disk Write Ops service checks will return unknown correctly as they are not available with EBS backed storage type.

Known Issues

This opspack will write over the variable 'AWS_CLOUDWATCH_AUTHENTICATION', so if you have any existing hosts monitoring AWS you may need to make changes to those hosts.

Setup and Configuration

To configure and utilize this Opspack, you simply need to add the 'Cloud - AWS - EC2 CloudWatch' Opspack to your Opsview Monitor system.

Step 1: Add the Host Template

Add the Cloud - AWS - EC2 CloudWatch Host Template to your Opsview Monitor host. Add the Primary Hostname/IP. This can be the Public DNS (IPV4) or IPV4 Public IP from the Description tab of an EC2 instance in the EC2 Console in AWS.

For more information, refer to Opsview Knowledge Center - Adding Host Templates to Hosts.

Step 2: Add and configure variables required for this host

Variable Description
AWS_CLOUDWATCH_AUTHENTICATION Authentication details for CloudWatch. The Value is not used and therefore can be set to anything. Either override the File Path with the location of your credentials file, or override the Access Key and Secret Key arguments (this approach is recommended as the values will be encrypted). Optionally, override the Region (default: eu-west-1) with the location of your instance if you are not using the default region.
AWS_EC2_INSTANCE_ID The Instance ID of your EC2 instance. Override the Value with the Instance ID of your EC2 instance.

For more information, refer to Opsview Knowledge Center - Adding Variables to Hosts.

Step 3: Apply changes and the system will now be monitored

View Service Checks

v1.0-opsview-5

ODI-309 - AWS Cloudwatch Opspacks

Initial release for AWS Cloudwatch Opspacks

v2.1-opsview-6

ODI-2230 EC2 cloudwatch servicechecks

Updated release of Opspack to work with Opsview Monitor 6.0 * General bug fixes. * Performance improvement to the EC2 describe instance calls. * Improvements to Error handling.

v2.0-opsview-6

ODI-1154 Release Opspacks for Opsview Monitor 6.0

Initial release of Opspack to work with Opsview Monitor 6.0