Dashboards: Templating init failed e.replace is not a function when I use Erigon Prometheus

  • 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:

    Step 3:

    • Wait for the browser to crash. Error message says: “Templating init failed e.replace is not a function.”
  • 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.
  • Did you follow any online instructions? If so, what is the URL?

    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