Monitoring your nodes

We've tried to make this guide as simple to follow as possible, however, if you have any suggestions or questions, please reach out to Ryan on Telegram @rp5210 or @PANLstakepool



These guides and samples will always be free to the community, however...


If you got some use out of this guide we ask that you help us to grow our active stake through delegation to [PANL] stake pool

Install / Configure Prometheus and node-exporter

(Only on node running data source node)

For Ubuntu 20.04:

sudo apt-get install -y prometheus prometheus-node-exporter
sudo systemctl daemon-reload
sudo systemctl enable prometheus sudo systemctl enable prometheus

Edit the prometheus.yml file (/etc/prometheus/prometheus.yml by default)

sudo nano /etc/prometheus/prometheus.yml

yml file should resemble the following:

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:

# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.

- job_name: 'prometheus'

# Override the global default and scrape targets from this job every 5 seconds.

scrape_interval: 5s

static_configs:

- targets: ['<core_ip_address>:12798']

labels:

alias: 'Core'

type: 'cardano-node'

- targets: ['<relay1_ip_address>:12798']

labels:

alias: 'Relay 1'

type: 'cardano-node'

- targets: ['<relay2_ip_address>:12798']

labels:

alias: 'Relay 2'

type: 'cardano-node'

- targets: ['<relay3_ip_address>:12798']

labels:

alias: 'Relay 3'

type: 'cardano-node'

- targets: ['<core_ip_address>:9100']

labels:

alias: 'Core'

type: 'node'

- targets: ['<relay1_ip_address>:9100']

labels:

alias: 'Relay 1'

type: 'node'

- targets: ['<relay2_ip_address>:9100']

labels:

alias: 'Relay 2'

type: 'node'

- targets: ['<relay3_ip_address>:9100']

labels:

alias: 'Relay 3'

type: 'node'

Exit nano saving the file

Restart your services:

sudo systemctl daemon-reload
sudo systemctl start prometheus
sudo systemctl enable prometheus.service

Install Prometheus Node-Exporter

(Repeat on each node to be monitored)

sudo apt install prometheus-node-exporter
sudo systemctl enable prometheus-node-exporter
sudo systemctl start prometheus-node-exporter

Install Grafana

(Run only on monitoring node / machine)
-- Full Install Documentation --

sudo apt-get install -y apt-transport-https
sudo apt-get install -y software-properties-common wget
wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
sudo apt-get update
sudo apt-get install grafana
sudo systemctl daemon-reload
sudo systemctl enable grafana-server.service

Secure Grafana Logins:
sudo nano /etc/grafana/grafana.ini
Find and set the following variables to false
[users]
allow_sign_up=false

[auth.anonymous]
enabled=false

Restart the service
sudo systemctl restart grafana-service

Configuring Grafana

Open http://<your_monitoring_node_ip>:3000 in a web browser

Login with with the default credentials (admin / admin) and change the password

Add your data source:

Add the Prometheus data source.

If you want to use our dashboard, the naming standard for data source is Prometheus with aliases "Core", "Relay 1", "Relay 2", and "Relay 3". There will also be some fields that do not work unless you set up the text collectors as described in the v2 guide.

Data Source

  1. Click the configuration gear icon, then click 'Add Data Source'

  2. Choose Prometheus

  3. Set name to Prometheus

  4. Set URL to http://<Prometheus_node_ip>:9090

  5. Click Save & Test

You are now ready to use Grafana to build your own monitoring dashboards.

For more examples: browse https://forum.cardano.org/t/please-share-your-grafana-dashboards-for-cardano-node/33633

Special thanks to [SNSKY] and [PHRK] for providing their dashboards to the community and assistance in troubleshooting.

Configure Pool Data monitoring from AdaPools.org

Thank you to Mik [ADATA]

https://pooldata.live/