Opsview Knowledge Center

Cloud - AWS - Overall Status

An overview of the AWS Overall Status Opspack for Opsview Monitor

This Opspack supports Amazon Cloudwatch for EC2, ELB, and RDS instances. It monitors and returns performance metrics for:

  • EC2: Instance CPU Utilization Disk Read/Write in Bytes or IOPS and Network In/Out.
  • ELB: Healthy and Unhealthy host count, request count and latency.
  • RDS: instance CPU utilization, DB Connections, Free Storage, Read and Write IOPS, Read and Write Latency, and Read and Write Throughput.

Prerequisites

Ruby

The ruby 'Cloudscripts' gem is used with this Opspack and should be installed as the nagios user. Ruby and rubygems should be available on your system and already use the command:

```
gem install CloudyScripts
```

On Ubuntu 10 Lucid, you should also install SSL support for Ruby:

```
apt-get install libopenssl-ruby
```

Security

An RSA key must be generated and saved to enable encryption of your AWS details. Use the commands:

```
mkdir /etc/cloutomate/
ssh-keygen -f /etc/cloutomate/cloutomate.pem
```

** \x{00E2} **** \x{0080} **** \x{00A6} **entering a blank passphrase, to create this file.

**Note:** sudo may be required in order to execute these commands, although the files cloutomate.pem and aws_credentials.cfg must be owned by nagios user; otherwise the values cannot be read by the plugin.

Amazon

You will need access to the Amazon Web Services account you wish to monitor, along with a valid Access Key and its Secret Key. See [Amazon's Documentation ](http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html) for information about using keys for security.

Configuration

Creating a credentials file

First, use the encrypt_aws_credentials.rb script to generate your credentials file:

```
ruby /usr/local/nagios/libexec/plugins.d/cloud-aws/encrypt_aws_credentials.rb -A (your Amazon access key ID) -S (your Amazon secret key) -f /usr/local/nagios/etc/aws_credentials.cfg
```

You can find your Access Key(s) by logging into the AWS site and accessing "Security Credentials" from your account's drop-down. If you don't know the Secret Key, you may need to create a new key.
The created file must not be distributed down to slaves.

Your Amazon host

You will need to know the Amazon server to enter as the Primary Hostname. This will be shown under 'Public DNS' in the instance information on Amazon's Management Console.

Variables

AWS_CLOUDWATCH_CREDENTIALS must have 'arg2' set to the Amazon Instance ID - also available from the AWS Management Console.

Example Installation

Environment:
**CLI:**

```
sudo mkdir /etc/cloutomate
sudo ssh-keygen -f /etc/cloutomate/cloutomate.pem
sudo gem install CloudyScripts
sudo ruby /usr/local/nagios/libexec/plugins.d/cloud-aws/encrypt_aws_credentials.rb -A (Amazon Access ID) -S (Amazon Secret Key) -f /usr/local/nagios/etc/aws_credentials.cfg
sudo chown -R nagios:nagios /etc/cloutomate
sudo chown nagios:nagios /usr/local/nagios/etc/aws_credentials.cfg
```

Cloud - AWS - Overall Status

An overview of the AWS Overall Status Opspack for Opsview Monitor