GithubHelp home page GithubHelp logo

isabella232 / autoscaling-nagios-checks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from forward3d/autoscaling-nagios-checks

0.0 0.0 0.0 108 KB

A collection of checks for AWS autoscaling (mainly for using spots with autoscaling)

Ruby 100.00%

autoscaling-nagios-checks's Introduction

Autoscaling Nagios checks

These plugins are used at Forward3D for monitoring autoscaling with spots.

check_aws_spot_price.rb

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.

check_autoscaling_desired_capacity.rb

This plugin checks to see if the given autoscaling group has as many running instances as the desired capacity.

check_autoscaling_process.rb

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.

Usage

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.

Required IAM permissions

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"
    }
  ]
}

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

autoscaling-nagios-checks's People

Contributors

andytinycat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.