1.0.2 • Published 9 years ago

metrics-aws-billing v1.0.2

Weekly downloads
19
License
-
Repository
github
Last release
9 years ago

metrics-aws-billing

An aws-billing plugin for segmentio/metrics.

Use this plugin to visualize your AWS hosting costs on a dashboard.

Installation

$ npm install metrics-aws-billing

Example

var Metrics = require('metrics');
var billing = require('metrics-aws-billing');

Metrics()
  .every('1d', billing(accountId, key, secret, bucket, region));

Metrics

The metrics exposed by this plugin are:

  • aws billing total - the total amount charged by AWS so far this billing period
  • aws billing estimated monthly total - rolling 30 day estimate of the total cost

and for each product, it will expose the following metric:

  • aws billing product total - the total amount charged by AWS so far this billing period
  • aws billing product estimated monthly total - rolling 30 day estimate of the total cost

image

Quickstart

Here's a full example of a Geckoboard dashboard showing your total AWS costs:

var Metrics = require('metrics');
var billing = require('metrics-aws-billing');
var geckoboard = require('geckoboard')('api-key');

new Metrics()
  .every('1d', billing(accountId, key, secret, bucket, region))
  .use(function (metrics) {
    metrics.on('aws billing total', function (metric) {
      geckoboard(widget).number(metric.latest());
    });
  });

License

MIT

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.0.1

10 years ago