Choose the tab for your consensus client. Paste the following configuration into the file.
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:'lighthouse'metrics_path:/metricsstatic_configs:-targets: ['localhost:8008']-job_name:'lighthouse_validator'metrics_path:/metricsstatic_configs:-targets: ['localhost:8009']
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:'Nimbus'metrics_path:/metricsstatic_configs:-targets: ['localhost:8008']-job_name:'Nimbus_Validator'metrics_path:/metricsstatic_configs:-targets: ['localhost:8009']
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:'Teku'metrics_path:/metricsstatic_configs:-targets: ['localhost:8008']-job_name:'Teku_Validator'metrics_path:/metricsstatic_configs:-targets: ['localhost:8009']
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:8009']-job_name:'Prysm'static_configs:-targets: ['localhost:8008']
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:'beacon'metrics_path:/metricsstatic_configs:-targets: ['localhost:8008']-job_name:'validator'metrics_path:/metricsstatic_configs:-targets: ['localhost:8009']
5. Setup prometheus for your execution client
Append the applicable job snippet for your execution client to the end of prometheus.yml.
Spacing matters. Ensure all job_name snippets are in alignment.
Here's an example of a Lighthouse-Nethermind config:
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:'Lighthouse'metrics_path:/metricsstatic_configs:-targets: ['localhost:5054']-job_name:'validators'metrics_path:/metricsstatic_configs:-targets: ['localhost:5064']-job_name:'nethermind'static_configs:-targets: ['localhost:6060']
To exit and save, press Ctrl + X, then Y, then Enter.
Add validators to your watchlist by clicking the bookmark symbol.
Option 2: Telegram Notifications
On the menu of Grafana, select Notification channels under the bell icon.
Click on Add channel.
Give the notification channel a name.
Select Telegram from the Type list.
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.
Create a new telegram group.
Invite the bot to your new group.
Type at least 1 message into the group to initialize it.
On the menu of Grafana, select Notification channels under the bell icon.
Click on Add channel.
Add a name to the notification channel.
Select Discord from the Type list.
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.
Enter the Webhook URL in the Discord notification settings panel.
Click Send Test, which will push a confirmation message to the Discord channel.
Option 4: Slack Notifications
On the menu of Grafana, select Notification channels under the bell icon.
Click on Add channel.
Add a name to the notification channel.
Select Slack from the Type list.
For instructions on setting up a Slack's Incoming Webhooks, see this section of their documentation.
Enter the Slack Incoming Webhook URL in the URL field.
Click Send Test, which will push a confirmation message to the Slack channel.