Archived community.zenoss.org | full text search
Skip navigation
Currently Being Moderated

2.4 Working with the EC2Manager Account

VERSION 5  Click to view document history
Created on: Mar 1, 2010 8:23 AM by Zenoss API - Last Modified:  Mar 1, 2010 8:34 AM by Zenoss API

 4. Working with the EC2Manager Account

The Instances tab on the manager shows each instance that is active in your Amazon EC2 account. Click an instance to view detailed information.

The Instance Type field is a link to a type object that references all instances of a particular type.

 

Figure 2.3. Instance Status

Instance Status

 4.1. CloudWatch Data

Amazon provides monitoring information through its CloudWatch APIs. These APIs provide monitoring information for each of their primary objects (Account, Instance, and Instance Type).

Metrics provided by the API are:

  • CPU utilization

  • Network in/out

  • Disk bytes read/write

  • Disk operations read/write

The metrics for an instance apply directly for the instances; for example, if an instance shows 100% CPU utilization, then its CPU is at maximum. However, for an instance type, 100% CPU utilization means that all instances within that type are at 100% CPU utilization. The same is true for the account; metrics are summed for all instances.

Zenoss collects monitoring information for the Account, Instance, and Instance Type objects. Account information appears on the Perf tab. Instance and Instance Type information appears on their main screens.

 4.2. Templates and Collection

Zenoss uses the standard monitoring template system to configure EC2 Manager accounts. Each template relies on a custom ZenCommand, zencw2, that polls the CloudWatch API and returns all available parameters. These parameters are used by their associated graphs. You can set thresholds against the parameters.

Templates for each primary object type are defined in the /AWS/EC2 class.

 

Table 2.2. Primary Object Type Templates

Object TypeTemplate

Account

EC2Manager

Instance

EC2Instance

Instance Type

EC2InstanceType


 4.2.1. Example: Initiating Load-Based Elasticity for an EC2 Setup

Suppose you want to use Zenoss to initiate load-based elasticity for your EC2 setup. For example, each time the account CPU exceeds 80%, you want Zenoss to create a new instance. To set up this scenario, you would first set up and model your account. Then, you would follow these steps:

  1. Go to the account monitoring template (/AWS/EC2/Templates/EC2Manager).

  2. Add a threshold against the zencw2_CPUUtilization CPU Utilization data point, and then set its event class to /Perf/CPU.

     

    Figure 2.4. Add Threshold

    Add Threshold

    Each time the CPU exceeds the threshold, Zenoss creates an event with the device name EC2Manager in the /Perf/CPU class.

  3. Create an event command that matches this event, and launch the EC2 command to create the new instances.

     

    Figure 2.5. Create Event Command

    Create Event Command

    When the event is initiated, the new instances will be created.

    Note

    The clear command can be used to shut down unneeded instances.

Comments (0)