diff --git a/cmd/prometheus/Readme.md b/cmd/prometheus/Readme.md index a0df1e196..6388a979c 100644 --- a/cmd/prometheus/Readme.md +++ b/cmd/prometheus/Readme.md @@ -5,11 +5,25 @@ Go to: [localhost:3000](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. + +- `XDG_DATA_HOME` re-defines default prometheus and grafana databases folder. - `TG_PROMETHEUS_CONFIG` path to custom `prometheus.yml` file. Default is: `./cmd/prometheus/prometheus.yml` - `TG_GRAFANA_CONFIG` path to custom `grafana.ini file`. Default is: `./cmd/prometheus/grafana.ini` To add custom TG host: copy `./cmd/prometheus/prometheus.yml`, modify, pass new location by: `TG_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/turbo_geth.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`