You are here

AWS - EC2 CloudWatch

Download version    6    5

Included in Opsview Monitor 5
Included in Opsview Monitor 6
check_circle
Opsview Supported
by Farhan Siddiqui

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.

Service Checks

Service Check Description Default Threshold Unit of Measurement
AWS/EC2.CPUUtilization The percentage of allocated EC2 units that are in use Warning: 80
Critical: 90
Percentage
AWS/EC2.CPUCreditBalance Must be T2 instance. The number of CPU credits available - Credits
AWS/EC2.CPUCreditUsage Must be T2 instance. The number of CPU credits consumed - Credits
AWS/EC2.DiskReadOps The number of completed read operations - Count
AWS/EC2.DiskWriteOps The number of completed write operations - Count
AWS/EC2.DiskWriteBytes Bytes written to all instance store volumes available to the instance - Bytes
AWS/EC2.DiskReadBytes Bytes read from all instance store volumes available to the instance - Bytes
AWS/EC2.NetworkIn The number of bytes received by the instance - Bytes
AWS/EC2.NetworkOut The number of bytes sent out on all network interfaces by the instance - Bytes
AWS/EC2.NetworkPacketsIn The number of packets received on all network interfaces by the instance - Count
AWS/EC2.NetworkPacketsOut The number of packets sent out on all network interfaces by the instance - Count
AWS/EC2.StatusCheckFailed Reports whether the instance has passed both the instance status check and the system status check - 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.

Step 1: Setup Host and Host Template

  • 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.
  • Host Title Can be any given name to the host by default Opsview chooses it to be the value in the Primary Hostname/IP field.
  • Choose the Host Group.
  • Choose the Cloud - AWS - EC2 CloudWatch from the list of Host Templates.

Add host template

Step 2: Add and configure the variables for the host

Add and configure the AWS_CLOUDWATCH_AUTHENTICATION Variables.

  • Click on the Variables tab.
  • Click on the Add New button. A drop down menu will appear.
  • Choose the AWS_CLOUDWATCH_AUTHENTICATION variable from the NAME field.
  • Put any description in the VALUE field on the right (Optional).
  • In the Override section update the arguments you want to pass to the service check.
  • If you have stored your aws API access credentials in a file you need to tick the Override File Path and add your path as shown in the figure below.
  • The preferred method is to override the Override Access Key and Override Secret Key arguments and store values as these can be stored encrypted.
  • If your EC2 instance is in a region other than the default (eu-west-1), override the Override Region by clicking the tick box in front of the text and provide the name of your region in the text field.

Add credentials variable

Step 3: Add and confgiure the EC2 instance id for the host

Add and configure the AWS_EC2_INSTANCE_ID variable.

  • Click on the Add New button. A drop down menu will appear.
  • Choose the AWS_EC2_INSTANCE_ID variable for the NAME field.
  • Type the Instance Id of the EC2 instance in the VALUE field.
  • You do not need to update any override configuration for this variable.

Add instance variable

Step 4: Reload and view the EC2 statistics

Click on the Submit Changes button. Once you have saved this host you need to Apply Changes from the Configuration menu.

Once the system is reloaded you can go to the Navigator page and view your service checks as below.

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