Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bonovoxly/coinmarketcap-exporter
coinmarketcap.com Prometheus Exporter
https://github.com/bonovoxly/coinmarketcap-exporter
Last synced: 4 months ago
JSON representation
coinmarketcap.com Prometheus Exporter
- Host: GitHub
- URL: https://github.com/bonovoxly/coinmarketcap-exporter
- Owner: bonovoxly
- License: mit
- Created: 2017-11-21T02:49:29.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-11-16T20:35:11.000Z (over 1 year ago)
- Last Synced: 2024-01-15T17:51:41.333Z (5 months ago)
- Language: Python
- Size: 236 KB
- Stars: 93
- Watchers: 6
- Forks: 46
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-stars - coinmarketcap-exporter - coinmarketcap.com Prometheus Exporter (Python)
- my-awesome-stars - bonovoxly/coinmarketcap-exporter - coinmarketcap.com Prometheus Exporter (Python)
- awesome-stars - bonovoxly/coinmarketcap-exporter - coinmarketcap.com Prometheus Exporter (Python)
README
# coinmarketcap-exporter
A prometheus exporter for . Provides Prometheus metrics from the API endpoint of Coinmarketcap, such as US price, Bitcoin price, trading volume, etc. [Blog post found here](http://blog.billyc.io/2017/12/02/a-prometheus-exporter-for-cryptocurrency-values-using-the-coinmarketcap-api/).
When running this exporter with both Prometheus and Grafana, [you can create dashboards like](https://grafana.com/dashboards/3890):
![coinmarketcap-single-dashboard](https://github.com/bonovoxly/coinmarketcap-exporter/raw/master/img/coinmarketcap.png "coinmarketcap-exporter with Prometheus and Grafana")
# Developing
- Build the image:
```sh
docker build -t coinmarketcap-exporter:latest .
```- Run it while listening on localhost:9101:
```sh
docker run --rm -p 127.0.0.1:9101:9101 coinmarketcap-exporter:latest
```- Run it interactively:
```sh
docker run --rm -it --entrypoint=/bin/sh -p 127.0.0.1:9101:9101 -v ${PWD}:/opt/coinmarketcap-exporter coinmarketcap-exporter:latest
```- Then to launch:
```sh
python coinmarketcap.py
```# Testing the Prometheus Grafana Stack
- In the `prometheus-compose` directory, run:
```sh
docker-compose up
```- Go to . Log in as `admin/admin`.
- To import the dashboard, click the "Home" button at the top, then on the right, click "Import Dashboard".
- Enter `3890` in the "Grafana.com Dashboard" field.
- Select the "prometheus" data source.
- Modify the other settings as preferred. Click "Import".
- The new dashboard should be selectable and found at .
- The Prometheus interface can be accessed at# Thanks and Links
- Coinmarketcap API link -
- Prometheus exporters -
- Writing JSON exporters in Python from Robust Perception -
- Grafana Dashboard -