1.0.0 • Published 9 years ago

cloudwatch-custom v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

Install

$ npm install --save cloudwatch-custom

Usage

var CloudWatchData = require('cloudwatch-custom');

var aws = {
    region          : 'us-east-1',
    accessKeyId     : 'your-key',
    secretAccessKey : 'your-secret',
};

var cloudwatch = new CloudWatchData(aws, 'your-namespace');

// track some metrics
cloudwatch.increment('user-created');
cloudwatch.increment('ios-push');

// send to cloudwatch every 5 minutes
new CronJob('0 */5 * * * *', function() {
    cloudwatch
        .send()
        .then(function (data) {
            console.log(data);
        })
        .catch(function (err) {
            console.log(err);
        });
}, null, true);

License

MIT

1.0.0

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago