Skip to content

Node-Exporter

Installation

  • available in Debain 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 /usr/share/doc/prometheus-node-exporter-collectors/README.textfile

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

Push to prometheus

When the node is behind a NAT/firewall metrics can get pushed. 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 the custom Pushgateway instance 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)