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.
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:
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.
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
Table 2.2. Primary Object Type Templates
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:
Go to the account monitoring template (
Add a threshold against the
zencw2_CPUUtilizationCPU Utilization data point, and then set its event class to
Each time the CPU exceeds the threshold, Zenoss creates an event with the device name EC2Manager in the
Create an event command that matches this event, and launch the EC2 command to create the new instances.
When the event is initiated, the new instances will be created.
clearcommand can be used to shut down unneeded instances.