Node Monitoring
Installation of Prometheus and Node Exporter
The Prometheus Node Exporter exposes a wide variety of hardware- and kernel-related metrics.
In this guide, you will:
Start up a Node Exporter on
localhostStart up a Prometheus instance on
localhostthat's configured to scrape metrics from the running Node Exporter
Installing Prometheus & Node Exporter
Prometheus instance install
wget https://github.com/prometheus/prometheus/releases/download/v*/prometheus-*.*-amd64.tar.gz
tar xvf prometheus-*.*-amd64.tar.gz
cd prometheus-*.*Copy tmp config to etc
/tmp/prometheus-2.31.1.linux-amd64# cp /tmp/prometheus-2.31.1.linux-amd64/prometheus.yml /etc/prometheusCreate service file for Prometheus to run
[Unit]
Description=Prometheus
Wants=network-online.target
After=network-online.target
[Service]
User=prometheus
Group=prometheus
Type=simple
ExecStart=/usr/local/bin/prometheus \
--config.file /etc/prometheus/prometheus.yml \
--storage.tsdb.path /var/lib/prometheus/ \
--web.console.templates=/etc/prometheus/consoles \
--web.console.libraries=/etc/prometheus/console_libraries
[Install]
WantedBy=multi-user.targetAs you have dedicated monitoring system. It is wise to add rules to firewall which will only allow prometheus server to scrape data.
Configuring your Prometheus instances
Install Node_Exporter
Create a service file
Troubleshooting
Some useful commands
Last updated