Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tonytw1/carbon-intensity-api-exporter
Exports UK Carbon Intensity API readings in Prometheus format.
https://github.com/tonytw1/carbon-intensity-api-exporter
carbon-emissions prometheus-exporter
Last synced: 4 days ago
JSON representation
Exports UK Carbon Intensity API readings in Prometheus format.
- Host: GitHub
- URL: https://github.com/tonytw1/carbon-intensity-api-exporter
- Owner: tonytw1
- Created: 2019-11-25T23:03:37.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-29T17:55:07.000Z (almost 5 years ago)
- Last Synced: 2024-06-19T14:54:37.153Z (5 months ago)
- Topics: carbon-emissions, prometheus-exporter
- Language: Go
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Carbon Intensity API exporter
Exports [UK Carbon Intensity API](https://carbonintensity.org.uk/) readings in Prometheus format.
### Build and run locally
```
git clone https://github.com/tonytw1/carbon-intensity-api-exporter.gitgo get -d -v ./...
go install -v ./...
go build ./..../carbon-intensity-api-exporter
```### Run with Docker
```
docker pull eu.gcr.io/eelpie-public/carbon-intensity-api-exporter
docker run -p 8080:8080 eu.gcr.io/eelpie-public/carbon-intensity-api-exporter
```### Scrape public target
```
- job_name: 'carbon-intensity'
static_configs:
- targets: ['carbon-intensity.eelpieconsulting.co.uk']
scrape_interval: 60s
```### Sample output
```
http://localhost:8080# HELP actual_intensity Actual intensity
# TYPE actual_intensity gauge
actual_intensity 206
# HELP forecast_intensity Forecast intensity
# TYPE forecast_intensity gauge
forecast_intensity 204
```