All Projects → linki → cryptoprom

linki / cryptoprom

Licence: MIT license
CryptoProm is a Prometheus metrics exporter for Cryptocurrency market prices.

Programming Languages

ruby
36898 projects - #4 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to cryptoprom

weather-station
A Prometheus exporter for 433 MHz temperature and humidity sensors
Stars: ✭ 60 (+215.79%)
Mutual labels:  grafana, prometheus-exporter
Unifiedmetrics
Fully-featured metrics collection agent for Minecraft servers. Supports Prometheus and InfluxDB. Dashboard included out-of-box.
Stars: ✭ 29 (+52.63%)
Mutual labels:  grafana, prometheus-exporter
loki exporter
Prometheus exporter to collect metrics and run queries against the Grafana Loki API.
Stars: ✭ 28 (+47.37%)
Mutual labels:  grafana, prometheus-exporter
macropower-analytics-panel
It's like Google Analytics, but for Grafana dashboards!
Stars: ✭ 16 (-15.79%)
Mutual labels:  grafana, prometheus-exporter
Citrix Adc Metrics Exporter
Export metrics from Citrix ADC (NetScaler) to Prometheus
Stars: ✭ 67 (+252.63%)
Mutual labels:  grafana, prometheus-exporter
prom-bitbucket-exporter
Prometheus Exporter for Bitbucket
Stars: ✭ 47 (+147.37%)
Mutual labels:  grafana, prometheus-exporter
Pihole Exporter
A Prometheus exporter for PI-Hole's Raspberry PI ad blocker
Stars: ✭ 352 (+1752.63%)
Mutual labels:  grafana, prometheus-exporter
v2ray-exporter
🧭 Prometheus exporter for V2Ray and V2Fly metrics, with a simple Grafana dashboard.
Stars: ✭ 47 (+147.37%)
Mutual labels:  grafana, prometheus-exporter
Prom Confluence Exporter
Prometheus Exporter For Confluence
Stars: ✭ 62 (+226.32%)
Mutual labels:  grafana, prometheus-exporter
Druid Exporter
A Golang based exporter captures druid API related metrics and receives druid-emitting HTTP JSON data.
Stars: ✭ 54 (+184.21%)
Mutual labels:  grafana, prometheus-exporter
bamboo-prometheus-exporter
Prometheus Exporter For Bamboo
Stars: ✭ 18 (-5.26%)
Mutual labels:  grafana, prometheus-exporter
Aliyun Exporter
Prometheus exporter for Alibaba Cloud Monitor
Stars: ✭ 210 (+1005.26%)
Mutual labels:  grafana, prometheus-exporter
tado-exporter
A Prometheus exporter for tado smart heating solution
Stars: ✭ 32 (+68.42%)
Mutual labels:  grafana, prometheus-exporter
prometheus-barman-exporter
Barman exporter for Prometheus
Stars: ✭ 23 (+21.05%)
Mutual labels:  grafana, prometheus-exporter
kafka-consumer-lag-monitoring
Client tool that exports the consumer lag of Kafka consumer groups to Prometheus or your terminal
Stars: ✭ 45 (+136.84%)
Mutual labels:  grafana, prometheus-exporter
Promcord
📊 Analyze your entire discord guild in grafana using prometheus. Message, User, Game and Voice statistics...
Stars: ✭ 39 (+105.26%)
Mutual labels:  grafana, prometheus-exporter
Jira Prometheus Exporter
Prometheus Exporter For JIRA
Stars: ✭ 113 (+494.74%)
Mutual labels:  grafana, prometheus-exporter
enviroplus exporter
Prometheus exporter for enviroplus module by Pimoroni
Stars: ✭ 70 (+268.42%)
Mutual labels:  grafana, prometheus-exporter
cassandra-exporter
Java agent for exporting Cassandra metrics to Prometheus
Stars: ✭ 59 (+210.53%)
Mutual labels:  prometheus-exporter
prometheus-sentry-exporter
Exports sentry project metrics for prometheus.
Stars: ✭ 32 (+68.42%)
Mutual labels:  prometheus-exporter

Crypto::Prom

Docker Repository on Quay GitHub release

CryptoProm is a Prometheus metrics exporter for Cryptocurrency market prices.

When you run it, it queries the Coinbase API once a minute to get the current market price of Bitcoin and exports that data via HTTP so that Prometheus can scrape it.

You can then use your favorite graphing tool, e.g. Grafana, to visualize the data from Prometheus however you want.

CryptoProm overview

Setup

You need to install Ruby 2.4 and Bundler, however other versions might work as well. Then install dependent Gems via Bundler and start the Rack server.

You have to provide your Coinbase API credentials in order to retrieve data from their API:

$ bundle install
$ export COINBASE_API_KEY="<your-api-key>"
$ export COINBASE_API_SECRET="<your-api-secret>"
$ rackup

Test that it works in a separate shell with curl:

$ curl -sS localhost:9292/metrics | grep cryptoprom
...
cryptoprom_cryptocurrency_rates{currency="AUD",denominator="USD"} 0.7462686567164178
...
cryptoprom_cryptocurrency_rates{currency="BTC",denominator="USD"} 1335.113484646195
cryptoprom_cryptocurrency_rates{currency="ETH",denominator="USD"} 59.990017661061195
cryptoprom_cryptocurrency_rates{currency="EUR",denominator="USD"} 1.0869565217391304
cryptoprom_cryptocurrency_rates{currency="GBP",denominator="USD"} 1.282051282051282
...
cryptoprom_cryptocurrency_rates{currency="ZWL",denominator="USD"} 0.0031018331834113963

This is Prometheus syntax and shows you the current value of each currency Coinbase knows about in USD, including BTC, ETH and various fiat currencies.

You can then use PromQL to query that data from Grafana. For instance, to create a chart displaying the current BTC price in USD over time you could use the following query:

cryptoprom_cryptocurrency_rates{currency="BTC"}

Which will result in the following graph:

CryptoProm detail

You can also do more advances queries. The following takes both the BTC and ETH prices in USD and relates them to each other. It basically shows what the "real" price for ETH in BTC should be, when only given their prices in USD.

cryptoprom_cryptocurrency_rates{currency="ETH"} / ignoring(currency) cryptoprom_cryptocurrency_rates{currency="BTC"}

Last but not least, you can monitor CryptoProm itself. It exports metrics about requests to its own metrics endpoint as well as its requests to the Coinbase API.

http_server_requests_total{code="200",method="get",path="/metrics"} 2.0
cryptoprom_coinbase_api_requests_total 14.0

You could use that to create a graph for CryptoProm's request rate against the Coinbase API to validate that it behaves and you don't run into rate limiting issues. You could create a Gauge in Grafana with the following PromQL query:

rate(cryptoprom_coinbase_api_requests_total[1h]) * 60

Which will display like this:

CryptoProm request rate

Deploying

The manifest folder contains Kubernetes manifests that describe how CryptoProm can be deployed. A Docker image can be found at quay.io/linki/cryptoprom.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].