Giter Site home page Giter Site logo

esille / coingecko-prometheus-exporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ruanbekker/coingecko-prometheus-exporter

0.0 0.0 0.0 21 KB

Prometheus Exporter to return CoinGecko Crypto Currency Results

Python 92.52% Dockerfile 7.48%

coingecko-prometheus-exporter's Introduction

coingecko-prometheus-exporter

Prometheus Exporter to return CoinGecko Crypto Currency Results

Usage

Set the cryptocurrency coins and fiat currency in the environment: CRYPTO_COINS=btc,dogecoin,tron and CURRENCY=eur that you would like to monitor, then:

$ docker-compose build
$ docker-compose up -d

And test by hitting the /metrics endpoint:

$ curl http://localhost:5000/metrics
# HELP python_gc_objects_collected_total Objects collected during gc
# TYPE python_gc_objects_collected_total counter
python_gc_objects_collected_total{generation="0"} 139.0
python_gc_objects_collected_total{generation="1"} 257.0
python_gc_objects_collected_total{generation="2"} 0.0
# HELP coingecko_current_price current price of crypto currency in USD
# TYPE coingecko_current_price gauge
coingecko_current_price{fiat_currency="usd",name="bitcoin",symbol="btc"} 57374.0
coingecko_current_price{fiat_currency="usd",name="ethereum",symbol="eth"} 3854.81
coingecko_current_price{fiat_currency="usd",name="ripple",symbol="xrp"} 1.51
coingecko_current_price{fiat_currency="usd",name="dogecoin",symbol="doge"} 0.497082
coingecko_current_price{fiat_currency="usd",name="cardano",symbol="ada"} 1.79
coingecko_current_price{fiat_currency="usd",name="polkadot",symbol="dot"} 39.74
coingecko_current_price{fiat_currency="usd",name="litecoin",symbol="ltc"} 362.49
coingecko_current_price{fiat_currency="usd",name="chainlink",symbol="link"} 51.39
coingecko_current_price{fiat_currency="usd",name="vechain",symbol="vet"} 0.222621
coingecko_current_price{fiat_currency="usd",name="tron",symbol="trx"} 0.140009
coingecko_current_price{fiat_currency="usd",name="zilliqa",symbol="zil"} 0.225872
coingecko_current_price{fiat_currency="usd",name="digibyte",symbol="dgb"} 0.143323
coingecko_current_price{fiat_currency="usd",name="siacoin",symbol="sc"} 0.03919376
coingecko_current_price{fiat_currency="usd",name="safemoon",symbol="safemoon"} 8.13e-06

Assuming that you already have prometheus running, then you can just append the prometheus.yml content to your scrape_configs.

Grafana

With Grafana you can have something like this:

image

Docker Hub

The image has been published at esille/coingecko-prometheus-exporter, example can be referenced fromt the docker-compose.yml or for a copy paste example:

$ docker run -it -e CRYPTO_COINS=bitcoin,ethereum,dogecoin -e CURRENCY=eur -p 5000:5000 esille/coingecko-prometheus-exporter

coingecko-prometheus-exporter's People

Contributors

esille avatar ruanbekker avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.