AWS CloudWatch
Simple wrapper around AWS CloudWatch API
Configuration
Simple JSON file, with the following format :
Available units are : 'Seconds | Microseconds | Milliseconds | Bytes | Kilobytes | Megabytes | Gigabytes | Terabytes | Bits | Kilobits | Megabits | Gigabits | Terabits | Percent | Count | Bytes/Second | Kilobytes/Second | Megabytes/Second | Gigabytes/Second | Terabytes/Second | Bits/Second | Kilobits/Second | Megabits/Second | Gigabits/Second | Terabits/Second | Count/Second | None'
Sample usage
'use strict'; // initialize (for example in app.js)var config = ;config; // require it everywhere you need to put some metricsvar cloudWatch = ; try cloudWatch; // will raise an error catcherr console; try cloudWatch; // will raise an error catcherr console; cloudWatch; // will send a 0 valuecloudWatch; // send 42 to metric 'metricNumber1'cloudWatch; // send 42 to metric 'metricNumber2', for dimension 'Dimension1' with 'DimValue1'cloudWatch; // send 42 to metric 'metricNumber2', for dimension 'Dimension1' with 'DimValue21'cloudWatch; // send aggregated values to 'MetricNumber3'cloudWatch; // aggregate values to metricNumber4 for a specific dimensioncloudWatch; // aggregate values to metricNumber4 for a specific dimension { console;} { console;}