Scraping Geth Prometheus metrics
Go-Ethereum (Geth) nodes expose a variety of system and node metrics with the integrated Prometheus exporter. This may be useful if you already use Prometheus / Grafana and want to integrate Blockdaemon nodes into your monitoring stack.
The Prometheus metrics endpoint
Geth nodes expose Prometheus metrics under the following URL. This endpoint requires Bearer auth using the token from your node settings page in the Blockdashboard.
Example cURL request
Note: This is one line.
curl -H "Authorization: Bearer <auth_token>" https://<your_node>.bdnodes.net/metrics/geth
To feed node metrics into your Prometheus instance, add a static scrape config to your Prometheus config,
- job_name: blockdaemon_geth_nodes
> type: Bearer<> credentials: "<insert your auth token here>"
- targets: - "<your_node>.bdnodes.net:443"
Reload Prometheus to apply the config.
To confirm whether scraping works, you can query for the metric chain_head_block to show the latest block number. The result should look like this:
Grafana is a popular frontend for Prometheus. It allows you to see all Geth metrics in a single dashboard. The Geth dashboard is available at https://grafana.com/grafana/dashboards/6976. Import it by ID:
This adds a new "Geth Prometheus" page:
If you have any questions let us know at Support@blockdaemon.com