Skip to content

Node-Exporter

available in buster as .deb

Install smartmontools without recommnded packages, otherwise it will install the mailutils (default) or bsd-mailx package.

sudo apt install --no-install-recommends  smartmontools
sudo apt install  prometheus-node-exporter

Textfile collector

cat /var/lib/prometheus/node-exporter/README.textfile

Default path set by node-exporter installed as debian package: /var/lib/prometheus/node-exporter

Push to prometheus

A custom, ansible managed systemd service push-prometheus-metrics.service is triggered by push-prometheus-metrics.timer on a regular basis and pushes all node-exporter metrics to https://prometheus-pushgateway.oas.varac.net, using /usr/local/bin/push-prometheus-metrics.

Community collector scripts

Issues

apt_upgrades_pending metric doesn't update to 0 anymore

scp /home/varac/projects/monitoring/prometheus/exporters/node-exporter-textfile-collector-scripts/apt_info.py \
  root@jump:/usr/share/prometheus-node-exporter-collectors/

or manually downgrade to the Bookworm package and pin it

Missing temp metrics on raspberry

Node exporter apparently doesn't track this metric and this was super easy to do by myself.

Metrics

CPU count

https://github.com/prometheus/node_exporter/blob/master/example-rules.yml#L4:

count(node_cpu{mode="idle"}) without (cpu,mode)