Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dnavarrom/grafana-aws-cost-explorer-backend
Grafana Backend for AWS Cost Explorer
https://github.com/dnavarrom/grafana-aws-cost-explorer-backend
aws aws-cost-explorer cost-explorer grafana grafana-backend grafana-dashboard
Last synced: 2 months ago
JSON representation
Grafana Backend for AWS Cost Explorer
- Host: GitHub
- URL: https://github.com/dnavarrom/grafana-aws-cost-explorer-backend
- Owner: dnavarrom
- License: mit
- Created: 2019-05-18T22:26:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T03:46:06.000Z (almost 2 years ago)
- Last Synced: 2024-09-09T02:49:48.264Z (4 months ago)
- Topics: aws, aws-cost-explorer, cost-explorer, grafana, grafana-backend, grafana-dashboard
- Language: JavaScript
- Size: 418 KB
- Stars: 32
- Watchers: 10
- Forks: 12
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# grafana-aws-cost-explorer-backend
Grafana Backend for AWS Cost Explorer using [AWS Cost Explorer Library](https://github.com/dnavarrom/aws-cost-explorer)![](./docs/minimal-dashboard.png)
Features:
* Cost Explorer API Query Cache to reduce costs
* YTD (Year to Date costs)
* MTD (Month to Date costs)
* Last Month costs
* Today Costs## Backend Configuration
### Config File
Details for AWS configuration [here](https://github.com/dnavarrom/aws-cost-explorer)
```
Git clone https://github.com/dnavarrom/grafana-aws-cost-explorer-backendcd grafana-aws-cost-explorer-backend
nano ./config/default.js
# Edit the following AWS variables
accessKeyId:
secretAccessKey:# Edit backend Security Settings
enabled : "false"
secret : "thepassword"# Optional cache settings
ttl : seconds to refresh cache (call aws api)
checkperiod : the same
deleteOnExpire : to delete cache when refresh#run server
node index.js
```
Test locally
```
curl localhost:8090
It works!!
```## Grafana Datasource Configuration
* Install [Simple Json Datasource Plugin](https://grafana.com/plugins/grafana-simple-json-datasource/installation)
* Configure New Datasource using Server Access (if you want to use browser based access, change AUTH.enabled = false in the backend config file)![](./docs/config-datasource2.png)
![](./docs/config-datasource3.png)## Grafana Dashboard Configuration
Sample Dashboard can be downloaded [here](./docs/sampleDashboard.json)
* Last Month Costs Widget uses Last Month Aggregated Query - Table Type
![](./docs/config-dashboard-1.png)* Month to Date uses Month to date Aggregated Query - Table type
![](./docs/config-dashboard-2.png)* Year to date uses Timeseries
![](./docs/config-dashboard-3.png)## Todo:
* Enable Tag Filtering (¿using variables?)
* Implement annotations
* Create docker image
* Create AWS Cloud Formation script