erigon-pulse/cmd/prometheus
Alex Sharov 017fb69da1
Fix GC chart (#2071)
* save

* save
2021-06-01 16:53:28 +07:00
..
dashboards Fix GC chart (#2071) 2021-06-01 16:53:28 +07:00
datasources Add support of geth on hostmachine (#437) 2020-04-11 08:22:23 +01:00
.gitignore Rename to Erigon (#2018) 2021-05-26 11:35:39 +01:00
grafana.ini Docker compose (#841) 2020-08-01 09:39:04 +02:00
prometheus.yml Rename to Erigon (#2018) 2021-05-26 11:35:39 +01:00
Readme.md Rename to Erigon (#2018) 2021-05-26 11:35:39 +01:00

Run Grafana and Prometheus: docker-compose up prometheus grafana

Go to: localhost:3000, admin/admin

List of hosts and ports to collecting metrics is in: ./cmd/prometheus/prometheus.yml

Env variables:

  • XDG_DATA_HOME re-defines default prometheus and grafana databases folder.
  • ERIGON_PROMETHEUS_CONFIG path to custom prometheus.yml file. Default is: ./cmd/prometheus/prometheus.yml
  • ERIGON_GRAFANA_CONFIG path to custom grafana.ini file. Default is: ./cmd/prometheus/grafana.ini

To add custom Erigon host: copy ./cmd/prometheus/prometheus.yml, modify, pass new location by: ERIGON_PROMETHEUS_CONFIG=/new/location/prometheus.yml docker-compose up prometheus grafana

For developers

How to update dashboards

  1. Edit dashboard right in Grafana UI as you need. Save.
  2. Go to "Dashboard Settings" -> "JSON Model" -> Copy json representation of dashboard.
  3. Go to file ./cmd/prometheus/dashboards/erigon.json and past json there.
  4. Commit and push. Done.

How to add new metrics

See example: ethdb/object_db.go:dbGetTimer

For gRPC metrics search in code: grpc_prometheus.Register