KMG Group GmbH has developed Nagios Cloudwatch, which is an open source plugin for Nagios and derivates like op5 to monitor Amazon Cloud infrastructure.

Monitor:

  • Cost
  • Virtual instances (EC2)
  • Elastic Load Balancers (ELB)
  • Database instnaces (EDB)

Check out the github project page!

To test this out, download the latest virtual appliance from OP5 at http://www.op5.com/download-op5-monitor/, unzip it on your computer, then do the following:

  1. Install the virtual machine. In the vSphere Client, select File > Deploy OVF Template, and select the .ovf file in your op5 directory. Follow the instructions and go to the web page mentioned in the console when the virtual machine is started.
  2. Log in to the op5 appliance per ssh (user: root, password: monitor)
  3. Install the nagios-cloudwatch script in your environment
1
2
3
4
cd /opt/plugins/custom
wget “https://github.com/maglub/nagios-cloudwatch/archive/stable.tar.gz”
tar xvzf stable.tar.gz
ln -s nagios-cloudwatch-stable nagios-cloudwatch
  1. Log in to the op5 appliance through the web gui (user: monitor, password: monitor)
  2. Go to the “Configure” page and select “Manage management packs”
  3. Upload the json file op5/nagios-cloudwatch.op5.management-pack.import.json found in the nagios-cloudwatch directory
  4. Save configuration

Now you are ready to add a couple of AWS instances. What is important to know is that the identifying attributes of an Amazon instance is:

  • Instance ID (i.e. i-123455)
  • Region (i.e. us-west-2)

These two attributes should be added to the host in Nagios as custom attributes for each server:

  • _EC2_ID -> Instance ID
  • _EC2_REGION -> The AWS region in which your instance is created

If you add the newlly created host in Nagios to the host group “esx-instances”, they will automatically be monitored for:

  • CPUUtilization
  • NetworkOut
  • StatusCheckFailed_System
  • DiskReadOps
  • NetworkIn
  • StatusCheckFailed
  • DiskWriteOps
  • StatusCheckFailed_Instance
  • DiskWriteBytes
  • DiskReadBytes

 

 

A good thing to do in the OP5 environment is to define and save a couple of filters:

  • EC2 Services -> Filter: [services] host.groups >= “ec2-instances”
  • EC2 Servers -> Filter: [hosts] groups >= “ec2-instances”