Chia Price Exporter is a standalone application which exports metrics to
a Prometheus compatible /metrics
endpoint.
chia-price-exporter serve
will start the metrics exporter on the default port of 9952
. Metrics will be available
at <hostname>:9952/metrics
.
To see further supported commands and flags try chia-price-exporter --help
.
The following metrics are supported and fully compatible with the great Chia Monitor and the Chia Farm Dashboard.
Metric | Description |
---|---|
chia_price_usd_cent |
USD price |
chia_price_eur_cent |
EUR price |
chia_price_btc_satoshi |
BTC price |
chia_price_eth_gwei |
ETH price |
Add this job configuration to the scrape_configs
section in your prometheus.yml
.
scrape_configs:
- job_name: 'chia-price-exporter'
scrape_interval: 60s
static_configs:
- targets: [ '<<CHIA-PRICE-EXPORTER-HOSTNAME>>:9952' ]
# build and run
task build
./bin/chia-price-exporter serve
# test manually
curl -v localhost:9952/metrics
# build and run
docker run --rm -p "9952:9952" -it $(docker buildx build -q .) serve
# test manually
curl -v localhost:9952/metrics
play with executable
docker run --rm -it $(docker buildx build -q .)
update go dependencies to latest and greatest
go get -u ./...