Module 6. Monitoring the nodes
Last updated
{
...
"TurnOnLogMetrics": true,
...
"hasPrometheus": [
"0.0.0.0",
12798
],
...
}wget https://github.com/prometheus/node_exporter/releases/download/v1.5.0/node_exporter-1.5.0.linux-amd64.tar.gz
tar xfvz node_exporter-1.5.0.linux-amd64.tar.gzsudo cp node_exporter-1.5.0.linux-amd64/node_exporter /usr/local/bin/sudo nano /etc/systemd/system/node_exporter.service[Unit]
Description=Node Exporter
After=network.target
[Service]
User=clr
Type=simple
ExecStart=/usr/local/bin/node_exporter
KillSignal=SIGTERM
RestartKillSignal=SIGTERM
TimeoutStopSec=30s
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.targetsudo systemctl daemon-reload
sudo systemctl start node_exporter# my global config
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager:9093
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
- job_name: 'CARDANO-NODE' # To scrape data from the Cardano node
scrape_interval: 5s
static_configs:
- targets: ['x.x.x.x:12798']
- targets: ['y.y.y.y:12798']
- targets: ['z.z.z.z:12798']
- job_name: 'EXPORTER' # To scrape data from a node exporter to monitor your Linux host metrics.
scrape_interval: 5s
static_configs:
- targets: ['x.x.x.x:9100']
- targets: ['y.y.y.y:9100']
- targets: ['z.z.z.z:9100']./prometheus --config.file=prometheus.yml