These plugins are used at Forward3D for monitoring autoscaling with spots.
This plugin will, given an autoscaling group name, check to see if the current spot price for the AS group's instance type, region, and AZ(s) is lower than the bid price in the group's configuration. It's designed to look for the situation where the price of the instance(s) you're using suddenly rises and your spots terminate. It can handle EC2 and VPC regions/AZs.
This plugin checks to see if the given autoscaling group has as many running instances as the desired capacity.
This plugin checks to see if the given autoscaling group has all autoscaling processes enabled, and returns WARNING and a list of the disabled processes if any are disabled.
All the plugins take the same arguments. Using check_aws_spot_price.rb
as an example:
Usage: check_aws_spot_price.rb [options]
-a, --access_key access_key AWS access key
-s, --secret_key secret_key AWS secret key
-g autoscaling_group, Autoscaling group to inspect
--autoscaling_group
-r, --region region Region to look at
The arguments are self-explanatory.
If you want to create a restricted IAM user to run this plugin (which is a good idea), then you need the following IAM permissions:
- ec2:DescribeSpotPriceHistory
- autoscaling:DescribeAutoScalingGroups
- autoscaling:DescribeAutoScalingInstances
- autoscaling:DescribeLaunchConfigurations
- autoscaling:DescribeScheduledActions
The following policy document should permit your IAM user the above rights:
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"autoscaling:DescribeAutoScalingGroups",
"autoscaling:DescribeAutoScalingInstances",
"autoscaling:DescribeLaunchConfigurations",
"autoscaling:DescribeScheduledActions"
],
"Sid": "Stmt1379497414000",
"Resource": [
"*"
],
"Effect": "Allow"
},
{
"Action": [
"ec2:DescribeSpotPriceHistory"
],
"Sid": "Stmt1379439419000",
"Resource": [
"*"
],
"Effect": "Allow"
}
]
}
- Fork it
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request