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
- node-exporter-textfile-collector-scripts
- checked out in
~/project/monitoring/prometheus/exporters/node-exporter-textfile-collector-scripts
Issues
apt_upgrades_pending metric doesn't update to 0 anymore
- Prometheus node-exporter
apt_upgrades_pendingmetric doesn't update to0anymore- The fix it merged:
Always write value for apt_upgrades_pending and apt_upgrades_held
and packaged in version
0.0~git20260402.7b3b207-1, but the Trixie Debian package is behind - Debian bug report
- The fix it merged:
Always write value for apt_upgrades_pending and apt_upgrades_held
and packaged in version
- Workarounds:
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)