Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/segment-boneyard/metrics-aws-billing
Visualize your AWS hosting costs on a dashboard
https://github.com/segment-boneyard/metrics-aws-billing
Last synced: about 5 hours ago
JSON representation
Visualize your AWS hosting costs on a dashboard
- Host: GitHub
- URL: https://github.com/segment-boneyard/metrics-aws-billing
- Owner: segment-boneyard
- Created: 2014-03-07T21:49:06.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-01-13T03:01:41.000Z (almost 10 years ago)
- Last Synced: 2024-04-28T08:41:47.715Z (7 months ago)
- Language: JavaScript
- Size: 172 KB
- Stars: 15
- Watchers: 40
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# metrics-aws-billing
An [aws-billing](https://github.com/segmentio/aws-billing) plugin for [segmentio/metrics](https://github.com/segmentio/metrics).
Use this plugin to visualize your AWS hosting costs on a dashboard.
## Installation
$ npm install metrics-aws-billing
## Example
```js
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 costand 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](https://cloud.githubusercontent.com/assets/658544/5673633/d7c93a44-9753-11e4-9222-afc8a5601166.png)
## Quickstart
Here's a full example of a [Geckoboard](https://github.com/segmentio/geckoboard) dashboard showing your total AWS costs:
```js
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