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:
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.
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 Type | Template |
---|---|
Account | EC2Manager |
Instance | EC2Instance |
Instance Type | EC2InstanceType |
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 (
/AWS/EC2/Templates/EC2Manager
).Add a threshold against the
zencw2_CPUUtilization
CPU Utilization data point, and then set its event class to/Perf/CPU
.Each time the CPU exceeds the threshold, Zenoss creates an event with the device name EC2Manager in the
/Perf/CPU
class.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.
Note
The
clear
command can be used to shut down unneeded instances.