Skip to content

dcarney/Cloudcost

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloudcost

Inspriation

"When performance is measured, performance improves. When performance is measured and reported back, the rate of improvement accelerates."

Thomas S. Monson. Favorite Quotations from the Collection of Thomas S. Monson. Deseret Books, 1985

http://www.tdan.com/i010ht03.htm

Thomas S. Monson

Honestly the inspiration was my boss and our exponentially increasing AWS bill... but this sounds cooler.

About

Cloudcost is a node.js web app that provides detail into AWS EC2 costs at a level not available in Amazon bills or usage reports.

Cost can be sliced by

  • instance
  • key/value metadata

Cost can be aggregated by

  • month-to-date
  • instance lifetime

Note that EC2 cost detail prior to use of Cloudcost is unavailable. Cloudcost needs to know when instances start and stop (i.e. needs to be running) to calculate cost accurately.

Dependencies

Dependencies you need to figure out

  • node.js
  • Any time an instance is started, stopped, or terminated a GET request needs to be made like the following:

This webservice is not yet implemented!! To get instance history a log in simpledb is currently used. The aim of the webservice is to abstract away the use of a custom simpledb domain.

http://localhost:8081/ec2?action=create&instanceId=i-e890bce7
http://localhost:8081/ec2?action=start&instanceId=i-e890bce7
http://localhost:8081/ec2?action=stop&instanceId=i-e890bce7
http://localhost:8081/ec2?action=terminate&instanceId=i-e890bce7

The dependencies below are installed automatically (as git submodules) using the installation instructions below.

Installation

$ git clone git://github.com/crcastle/cloudcost.git
$ cd Cloudcost

# Update submodules
$ git submodule update --init --recursive

# Copy the default configuration file
# and add your AWS account credentials
# note that credentials are defined separately for ec2 and simpledb
$ cp config.json.sample config.json

# open Clouscost/lib/aws-lib/lib/ec2.js
# change the date on line 25 to 2010-11-15
# (or later might work)

Running

$ node server.js

Once it you see "dataGrid refreshed" at least one time on the console you're ready to go. Total Cost and MTD (month-to-date) Cost will take a little time to update depending on how many instances you have and how many starts and stops there are for each.

Go to http://localhost:8081/

About

Monitor AWS EC2 Costs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%