-
What Grafana version and what operating system are you using?
- Version 10.0.1 (commit: 5a30620, branch: HEAD)
-
What are you trying to achieve?
- Monitoring some metrics when using Erigon Prometheus
-
How are you trying to achieve it?
Step 0:
- Run prometheus locally
./prometheus --config.file=./prometheus.yml --web.listen-address=:9010
The prometheus.yml is
global: scrape_interval: 10s scrape_timeout: 3s evaluation_interval: 5s scrape_configs: - job_name: erigon # example, how to connect prometheus to Erigon metrics_path: /debug/metrics/prometheus scheme: http static_configs: - targets: - XXX.XXX.XXX.XX:6060
Step 1:
- Open Grafana and add data source of Prometheus, the URL is set to
http://localhost:9010
Step 2:
- Now import dashboard, the json template is from https://github.com/ledgerwatch/erigon/blob/devel/cmd/prometheus/dashboards/erigon.json
Step 3:
- Wait for the browser to crash. Error message says: “Templating init failed e.replace is not a function.”
- Run prometheus locally
-
What happened?
- Templating init failed e.replace is not a function when I use Erigon Prometheus.
-
What did you expect to happen?
- Some metrics should be shown like
-
Can you copy/paste the configuration(s) that you are having problems with?
- Templates in Step 2.
-
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
- Yes.
Templating init failed e.replace is not a function
shows.
- Yes.
-
Did you follow any online instructions? If so, what is the URL?
-
No. However, this bug does not seem to be the first time it has appeared, and many people have mentioned it before
- https://localhost:3000/t/templating-namespace-error-updating-options-e-replace-is-not-a-function/66691/1
- Error: e.replace is not a function - after creating data link in field override #28714
Their fix was to upgrade grafana, but the version we’re currently using is the latest.
-
Sorry for some links are missing because I can only put at most 2 links