Launch and Active Services

Launch and Active Services

Launch a daemon reload to take the services into account in systemd:
1
sudo systemctl daemon-reload
Copied!
Start the services:
1
sudo systemctl start prometheus.service
2
sudo systemctl start node_exporter.service
3
sudo systemctl start process-exporter.service
4
sudo systemctl start alertmanager.service
5
sudo systemctl start grafana-server
Copied!
And check that they are working fine, one by one:
1
systemctl status prometheus.service
2
systemctl status node_exporter.service
3
systemctl status process-exporter.service
4
systemctl status alertmanager.service
5
systemctl status grafana-server
Copied!
A service working fine should look like this:
When everything is okay, activate the services!
1
sudo systemctl enable prometheus.service
2
sudo systemctl enable node_exporter.service
3
sudo systemctl enable process-exporter.service
4
sudo systemctl enable alertmanager.service
5
sudo systemctl enable grafana-server
Copied!

Test Alert manager

Run this command to fire an alert:
1
curl -H "Content-Type: application/json" -d '[{"labels":{"alertname":"Test"}}]' localhost:9093/api/v1/alerts
Copied!
Check your inbox, you have a surprise:
You will always receive a Firing alert first, then a Resolved notification to indicate the alert isn’t active anymore.

Run Grafana dashboard

Now is the time to get the most visual part: the monitoring dashboard.
From the browser on your local machine, connect to the custom port on localhost that we have set at the beginning of this guide:
1
http://localhost:2022
Copied!
Enter the default user admin and password admin then change the password.

Add data Sources

Open the Settings menu:
Click on Data Sources:
Click on Add data source:
Select Prometheus:
Just fill the URL with http://localhost:9090 and click Save & Test. Then add a new data source and search for Alert Manager
Fill the URL with http://localhost:9093 and click Save & Test.
Now you have your 2 data sources set like that:

Import the dashboard

Open the New menu:
Click on Import:
Select our favorite dashboard 13840, we recommend using this dashboard because it's created by one of our Ambassadors and we don't want to fork this. All credits goes to him.
Select the Prometheus and AlertManager sources and click Import.Dashboard selection
In the dashboard selection, make sure you select:
    Chain Metrics: polkadot for a Polkadot/Kusama node, substrate for any other parachain node
    Chain Instance Host: localhost:9615 to point the chain data scrapper
    Chain Process Name: the name of your node binary
And here you go, everything is set!
Monitoring dashboard Polkadot Essentials
Easy right? Just think about saving the dashboard once parameters are set and work.
Note: you can also consider Parity’s dashboards for advanced monitoring and analysis.
Last modified 6mo ago