https://github.com/edasque/cloudwatch2graphite was written as a generic utility. When I recently moved it to using 'aws-sdk' instead of the unofficial 'aws2js', I hacked the genericity/configurability out. cw2graphite should again be configurable for multiple metrics- This configurability should use the native node-config instead of optparse
This application will output graphite counters for a list of AWS CloudWatch metrics. All you need to do is :
- copy
config/default.json,sampleintoconfig/default.jsonand set up youraccessKeyId,secretAccessKeyandregionas well as metrics.
You'll find here the reference to NameSpaces, metrics, units and dimensions you'll want to refer to to set up your metrics.json (metrics.json.sample is a good starting point). Thus far this has been tested with EC2, ELB & DynamoDB.
This software is governed by the Apache 2.0 license.
typically, to test you should simply run:
node cw2graphite.js
You'll need to install a few modules, including:
-
dateformat
-
aws-sdk
-
minimist & config
simply running this should do the job :
npm install
aws.dynamodb.rad_impressions.throttledrequests.updateitem.sum.count 28.0 1359407920
aws.elb.radimp.requestcount.sum.count 933.0 1359407920
aws.dynamodb.rad_impressions.consumedwritecapacityunits.sum.count 890.0 1359407920
typically, in a cron, you'd run:
node cw2graphite.js | nc host 2003