Skip to content
colinbjohnson edited this page Jul 16, 2012 · 1 revision

Summary

as-apply-alarms will apply CPU alarms for either a particular Auto Scaling Group or all Auto Scaling Groups in a given region.

Example

In the example below, the tool as-apply-alarms will be used to apply alarms to all Auto Scaling Groups using the -a option - one named "web-server" and one named "app-server." First, we'll use as-describe-auto-scaling-groups to show the groups that we'll be applying alarms to.

 $ as-describe-auto-scaling-groups
 AUTO-SCALING-GROUP  app-server  app-server  us-east-1a  1  1  1
 INSTANCE  i-ad04d9c9  us-east-1a  InService  Healthy  app-server
 AUTO-SCALING-GROUP  web-server  web-server  us-east-1a  1  1  1
 INSTANCE  i-df04d9bb  us-east-1a  InService  Healthy  web-server

Second, we'll execute as-apply-alarms.sh with the -a switch to apply alarms to all scaling groups.

 $ as-apply-alarms.sh -a
 Alarms will be applied to all Auto Scaling Groups.
 Applying Alarms to the Auto Scaling Group named app-server.
 OK-Created Alarm
 Applying Alarms to the Auto Scaling Group named web-server.
 OK-Created Alarm

Last, you can see the output of as-apply-alarms. In our particular example, we have created two alarms that are triggered when CPU Utilization averages greater than 90% utilization across either the "web-server" or "app-server" Auto Scaling Groups: http://aws-missing-tools.googlecode.com/svn/wiki/images/as-apply-alarms-Output-01.png

Clone this wiki locally