Installing & configuring Grafana

Download and install Grafana

Install Grafana using the APT package manager - Download the Grafana GPG key, add Grafana to the APT sources, refresh the apt cache, and check that Grafana has been added to the APT repository.

wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
sudo add-apt-repository "deb https://packages.grafana.com/oss/deb stable main"
sudo apt update
apt-cache policy grafana

Expected output: Ensure the top-most version matches with latest version here - https://grafana.com/grafana/download

grafana:
  Installed: (none)
  Candidate: 10.0.3
  Version table:
     10.0.3 500
        500 <https://packages.grafana.com/oss/deb> stable/main amd64 Packages
     10.0.2 500
        500 <https://packages.grafana.com/oss/deb> stable/main amd64 Packages
     10.0.1 500
        500 <https://packages.grafana.com/oss/deb> stable/main amd64 Packages

Run the installation command.

sudo apt install -y grafana

Start the Grafana server.

The output should say Grafana is “active (running)”. Press CTRL-C to exit and Grafana will continue to run.

Use the following command to check the logs for any warnings or errors:

Press CTRL-C to exit.

If the Grafana service is running smoothly, we can now enable it to fire up automatically when rebooting the system.

Configure the Grafana Dashboard

  1. go to http://<yourserverip>:3000/

  2. Enter admin for both username and password

  3. Select Data Sources and click on Add data source , then choose Prometheus and enter http://localhost:9090 for the URL

  4. Setup dashboards - On the left menu bar, click on Dashboards >> Import

    • Execution client dashboard

      • Nethermind: Paste the JSON text from here

      • Besu: Enter the dashboard ID - 10273

      • Geth: Enter the dashboard ID - 13877

    • Consensus client dashboard

      • Teku: Enter the dashboard ID - 16737

        • Nimbus: Paste the JSON text from the options below

        • Lodestar: Paste the JSON text from here

        • Lighthouse: Paste the JSON text from here

        • Prysm: Paste the JSON text from here

    • Node Exporter dashboard - Paste the JSON text here

  5. Select Prometheus from the "Select a Prometheus data source here" drop down field.

Screenshot samples of Grafana Dashboard

Execution client:

Consensus client:

Node Exporter:

[Optional] Pushgateway

This dependency is specific to the Nethermind execution layer client to enable the Grafana monitoring dashboard to work properly if you are following along the Nethermind documentation.

Download the latest version and the checksums list.

Expected output: Verify output of the checksum verification

If checksum is verified, extract the files and move them into the (/usr/local/bin) directory for neatness and best practice.

Then, clean up the duplicated copies.

Create an account (pushgateway) without server access for Pushgateway to run as a background service.

Create the systemd configuration file to run Pushgateway.

Paste the following contents into the configuration file.

Once you're done, save with Ctrl+O and Enter, then exit with Ctrl+X.

Start the Pushgateway service.

Expected output: The output should say Pushgateway is “active (running)”. Press CTRL-C to exit and Pushgateway will continue to run.

Monitor for causes of error messages otherwise.

Last updated