eth-state-metrics/README.md

36 lines
780 B
Markdown
Raw Normal View History

2020-12-04 19:48:57 +00:00
# Prometheus Metrics for Geth-Statediff
Server exposes `/metrics` endpoint with Prometheus metrics:
2024-02-28 18:07:11 +00:00
- `eth_state_metrics_etherscan` - latest block from Etherscan
- `eth_state_metrics_statediff_db` - latest block from Statediff Database
StateDiff DB is not strictly required to be available if all you care about is etherscanning
2020-12-04 19:48:57 +00:00
## How to run
### Locally
```
# copy config template
cp .env.example .env
# edit it and set Etherscan API Key and Database Credentials
# run server
2024-02-28 18:07:11 +00:00
node src/index.js
2020-12-04 19:48:57 +00:00
```
2024-02-28 18:07:11 +00:00
2020-12-04 19:48:57 +00:00
And then open in browser `http://172.17.0.2:3000/metrics`
2024-02-28 18:07:11 +00:00
### Docker
2020-12-04 19:48:57 +00:00
```
docker run \
-e SERVER_HOST=0.0.0.0 \
-e ETHERSCAN_API_KEY="https://api.etherscan.io" \
2020-12-04 19:48:57 +00:00
-e ETHERSCAN_API_KEY=*** \
-e STATEDIFF_PG_HOST=*** \
-d vulcanize/eth-state-metrics
2024-02-28 18:07:11 +00:00
```