English
Coins
Monitoring your validator with Grafana and Prometheus
Prometheus is a monitoring platform that collects metrics from monitored targets by scraping metrics HTTP endpoints on these targets. Official documentation is available here. Grafana is a dashboard used to visualize the collected data.

Install prometheus and prometheus node exporter.
sudo apt-get install -y prometheus prometheus-node-exporter
Install grafana.
wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
echo "deb https://packages.grafana.com/oss/deb stable main" > grafana.list
sudo mv grafana.list /etc/apt/sources.list.d/grafana.list
sudo apt-get update && sudo apt-get install -y grafana
Enable services so they start automatically.
sudo systemctl enable grafana-server.service prometheus.service prometheus-node-exporter.service
Create the prometheus.yml config file. Choose the tab for your eth client. Simply copy and paste.
Lighthouse
Nimbus
Teku
Prysm
Lodestar
cat > $HOME/prometheus.yml << EOF
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'codelab-monitor'
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
- job_name: 'node_exporter'
static_configs:
- targets: ['localhost:9100']
- job_name: 'nodes'
metrics_path: /metrics
static_configs:
- targets: ['localhost:5054']
- job_name: 'validators'
metrics_path: /metrics
static_configs:
- targets: ['localhost:5064']
EOF
cat > $HOME/prometheus.yml << EOF
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'codelab-monitor'
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
- job_name: 'node_exporter'
static_configs:
- targets: ['localhost:9100']
- job_name: 'nodes'
metrics_path: /metrics
static_configs:
- targets: ['localhost:8008']
EOF
cat > $HOME/prometheus.yml << EOF
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'codelab-monitor'
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
- job_name: 'node_exporter'
static_configs:
- targets: ['localhost:9100']
- job_name: 'nodes'
metrics_path: /metrics
static_configs:
- targets: ['localhost:8008']
EOF
cat > $HOME/prometheus.yml << EOF
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'codelab-monitor'
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
- job_name: 'node_exporter'
static_configs:
- targets: ['localhost:9100']
- job_name: 'validator'
static_configs:
- targets: ['localhost:8081']
- job_name: 'beacon node'
static_configs:
- targets: ['localhost:8080']
- job_name: 'slasher'
static_configs:
- targets: ['localhost:8082']
EOF
cat > $HOME/prometheus.yml << EOF
scrape_configs:
- job_name: 'node_exporter'
static_configs:
- targets: ['localhost:9100']
- job_name: 'Lodestar'
metrics_path: /metrics
static_configs:
- targets: ['localhost:8008']
EOF
Setup prometheus for your execution client. Start by editing prometheus.yml
nano $HOME/prometheus.yml
Append the applicable job snippet for your execution client to the end of prometheus.yml. Save the file.
Spacing matters. Ensure all job_name snippets are in alignment.
Geth
Besu
Nethermind
Erigon
- job_name: 'geth'
scrape_interval: 15s
scrape_timeout: 10s
metrics_path: /debug/metrics/prometheus
scheme: http
static_configs:
- targets: ['localhost:6060']
- job_name: 'besu'
scrape_interval: 15s
scrape_timeout: 10s
metrics_path: /metrics
scheme: http
static_configs:
- targets:
- localhost:9545
- job_name: 'nethermind'
scrape_interval: 15s
scrape_timeout: 10s
honor_labels: true
static_configs:
- targets: ['localhost:9091']
Nethermind monitoring requires Prometheus Pushgateway. Install with the following command.
sudo apt-get install -y prometheus-pushgateway
Pushgateway listens for data from Nethermind on port 9091.
- job_name: 'erigon'
scrape_interval: 10s
scrape_timeout: 3s
metrics_path: /debug/metrics/prometheus
scheme: http
static_configs:
- targets: ['localhost:6060']
Move it to /etc/prometheus/prometheus.yml
sudo mv $HOME/prometheus.yml /etc/prometheus/prometheus.yml
Update file permissions.
sudo chmod 644 /etc/prometheus/prometheus.yml
Finally, restart the services.
sudo systemctl restart grafana-server.service prometheus.service prometheus-node-exporter.service
Verify that the services are running properly:
sudo systemctl status grafana-server.service prometheus.service prometheus-node-exporter.service
💡
Reminder: Ensure port 3000 is open on the firewall and/or port forwarded if you intend to view monitoring info from a different machine.

  1. 1.
    Open http://localhost:3000 or http://<your validator's ip address>:3000 in your local browser.
  2. 2.
    Login with admin / admin
  3. 3.
    Change password
  4. 4.
    Click the configuration gear icon, then Add data Source
  5. 5.
    Select Prometheus
  6. 6.
    Set Name to "Prometheus"
  7. 7.
    Set URL to http://localhost:9090
  8. 8.
    Click Save & Test
  9. 9.
    Download and save your consensus client's json file. More json dashboard options available below. [ Lighthouse | Teku | Nimbus | Prysm | Prysm > 10 Validators | Lodestar ]
  10. 10.
    Download and save your execution client's json file [ Geth | Besu | Nethermind | Erigon ]
  11. 11.
    Download and save a node-exporter dashboard for general system monitoring
  12. 12.
    Click Create + icon > Import
  13. 13.
    Add the consensus client dashboard via Upload JSON file
  14. 14.
    If needed, select Prometheus as Data Source.
  15. 15.
    Click the Import button.
  16. 16.
    Repeat steps 12-15 for the execution client dashboard.
  17. 17.
    Repeat steps 12-15 for the node-exporter dashboard.
🔥
Troubleshooting common Grafana issues
Symptom: Your dashboard is missing some data.
Solution: Ensure that the execution or consensus client has enabled the appropriate metrics flag.
  • Geth: geth --http --metrics --pprof
  • Besu: besu --metrics-enabled=true
  • Nethermind: Nethermind.Runner --Metrics.Enabled true
  • Erigon: erigon --metrics
  • Lighthouse beacon-node: lighthouse bn --validator-monitor-auto
  • Nimbus: nimbus_beacon_node --metrics --metrics-port=8008
  • Teku: --metrics-enabled=true --metrics-port=8008
  • Lodestar beacon-node: lodestar beacon --metrics true

Lighthouse
Nimbus
Teku
Prysm
Lodestar

Node-Exporter Dashboard by starsliao
General system monitoring
Includes: CPU, memory, disk IO, network, temperature and other monitoring metrics。
Credits: starsliao

Setup alerts to get notified if your validators go offline.
Get notified of problems with your validators. Choose between email, telegram, discord or slack.
Email Notifications
Telegram Notifications
Discord Notifications
Slack Notifications
  1. 2.
    Sign up for an account.
  2. 3.
    Verify your email
  3. 4.
    Search for your validator's public address
  4. 5.
    Add validators to your watchlist by clicking the bookmark symbol.
  1. 1.
    On the menu of Grafana, select Notification channels under the bell icon.
  2. 2.
    Click on Add channel.
  3. 3.
    Give the notification channel a name.
  4. 4.
    Select Telegram from the Type list.
  5. 5.
    To complete the Telegram API settings, a Telegram channel and **bot **are required. For instructions on setting up a bot with @Botfather, see this section of the Telegram documentation. You need to create a BOT API token.
  6. 6.
    Create a new telegram group.
  7. 7.
    Invite the bot to your new group.
  8. 8.
    Type at least 1 message into the group to initialize it.
  9. 9.
    Visit https://api.telegram.org/botXXX:YYY/getUpdates where XXX:YYY is your BOT API Token.
  10. 10.
    In the JSON response, find and copy the Chat ID. Find it between **chat **and title. Example of Chat ID: -1123123123
    "chat":{"id":-123123123,"title":
  11. 11.
    Paste the Chat ID into the corresponding field in Grafana.
  12. 12.
    Save and test the notification channel for your alerts.
  13. 13.
    Now you can create custom alerts from your dashboards. Visit here to learn how to create alerts.
  1. 1.
    On the menu of Grafana, select Notification channels under the bell icon.
  2. 2.
    Click on Add channel.
  3. 3.
    Add a name to the notification channel.
  4. 4.
    Select Discord from the Type list.
  5. 5.
    To complete the set up, a Discord server (and a text channel available) as well as a Webhook URL are required. For instructions on setting up a Discord's Webhooks, see this section of their documentation.
  6. 6.
    Enter the Webhook URL in the Discord notification settings panel.
  7. 7.
    Click Send Test, which will push a confirmation message to the Discord channel.
  1. 1.
    On the menu of Grafana, select Notification channels under the bell icon.
  2. 2.
    Click on Add channel.
  3. 3.
    Add a name to the notification channel.
  4. 4.
    Select Slack from the Type list.
  5. 5.
    For instructions on setting up a Slack's Incoming Webhooks, see this section of their documentation.
  6. 6.
    Enter the Slack Incoming Webhook URL in the URL field.
  7. 7.
    Click Send Test, which will push a confirmation message to the Slack channel.
Copy link
Edit on GitHub
On this page
6.1 Installation
6.2 Setting up Grafana Dashboards
6.3 Setup Alert Notifications