Giter Site home page Giter Site logo

spotdog's Introduction

Spotdog

Build Status Code Climate Test Coverage Dependency Status Gem Version MIT License

Spotdog is a command line tool to send EC2 Spot Instance Pricing History to Datadog. Spotdog enables us to monitor pricing history on Datadog.

status___datadog

Supported Ruby version

Ruby 2.x

Deploy to Heroku

See spotdog-heroku for details.

Deploy

Local Installation

Add this line to your application's Gemfile:

gem 'spotdog'

And then execute:

$ bundle

Or install it yourself as:

$ gem install spotdog

Prerequisites

You need to set AWS credentials and Datadog API key as environment variables.

export AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXXXXX
export AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export AWS_DEFAULT_REGION=xx-yyyy-0

export DATADOG_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Usage

$ spotdog help
Commands:
  spotdog help [COMMAND]  # Describe available commands or one specific command
  spotdog history         # Send spot instance price history
  spotdog requests        # Send spot instance requests

Send spot instance price history (spotdog history)

spotdog history sends spot instance price history during the specified range.

$ spotdog help history
Usage:
  spotdog history

Options:
  i, [--instance-types=INSTANCE_TYPES]              # List of instance types
  m, [--max-results=N]                              # Number of results
  p, [--product-descriptions=PRODUCT_DESCRIPTIONS]  # List of product descriptions
  s, [--start-time=START_TIME]                      # The time which to start retriving the prices
  e, [--end-time=END_TIME]                          # The time which to stop retriving the prices
  l, [--last-minutes=N]                             # The duration in minutes which to retrive the prices
  • -i, --instance-type
  • List of instance types, like m4.large,c4.xlarge.
  • -m, --max-results
  • Number of results
  • -p, --product-descriptions
  • List of product descriptions, like linux_vpc,suse_vpc. These values are allowed: linux_vpc, linux_classic, suse_vpc, suse_classic, windows_vpc and windows_classic.
  • -s, --start-time
  • The time which to start retriving the prices, like 2015-10-06 18:00 JST
  • -e, --end-time
  • The time which to stop retriving the prices, like 2015-10-06 19:00 JST
  • -l, --last-minutes
  • The duration in minutes which to retrive the prices.

Send spot instance requests (spotdog requests)

spotdog requests sends the number of spot instance requests per status (open, active, failed, closed, canceled).

$ spotdog help requests
Usage:
  spotdog requests

Development

After checking out the repo, run bin/setup to install dependencies. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/dtan4/spotdog. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

MIT License

spotdog's People

Contributors

dtan4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.