Setting Up Dashboards
🐣 Installing Prometheus and Grafana
sudo apt-get install -y prometheus prometheus-node-exporter sudo apt-get install -y prometheus-node-exporter sudo apt-get install -y apt-transport-https
sudo apt-get install -y software-properties-common wget
sudo wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.keyecho "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.listsudo apt-get update && sudo apt-get install -y grafanasudo systemctl enable grafana-server.service
sudo systemctl enable prometheus.service
sudo systemctl enable prometheus-node-exporter.servicesudo systemctl enable prometheus-node-exporter.servicecat > 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:
# The job name is added as a label job=<job_name> to any timeseries scraped from this config.
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9100']
labels:
alias: 'relaynode1'
type: 'prometheus-node-exporter'
- targets: ['<block producer ip address>:9100']
labels:
alias: 'block-producer-node'
type: 'prometheus-node-exporter'
- targets: ['<block producer ip address>:12798']
labels:
alias: 'block-producer-node'
type: 'cardano-node'
- targets: ['localhost:12798']
labels:
alias: 'relaynode1'
type: 'cardano-node'
EOF
sudo mv prometheus.yml /etc/prometheus/prometheus.yml📶 Configuring Grafana

Last updated
