Host Setup
VM monitoring configuration
This document describes how to expose metrics from VMs for Prometheus scraping: node_exporter (system metrics), prometheus-podman-exporter (Podman containers), and collectd's Prometheus output (OpenMediaVault).
Prerequisites
- A working Prometheus server that can reach the VMs.
- Root or
sudoaccess on each VM.
Node Exporter (systemd, RHEL/Fedora examples)
- Install the package:
- Check the service status:
- Create or update a systemd override file to set exporter options. Create
/etc/systemd/system/prometheus-node-exporter.service.d/override.confwith the following contents:
Tip
Edit systemd file with this command:
[Service]
ExecStart=
ExecStart=/usr/bin/node_exporter \
--web.listen-address=0.0.0.0:9100 \
--collector.systemd \
--collector.systemd.unit-include=".*" \
--collector.processes \
--no-collector.xfs \
--collector.filesystem.mount-points-exclude="^/(sys|proc|dev|run|var/lib/docker|var/lib/containers|var/lib/kubelet)(/|$)" \
--collector.filesystem.fs-types-exclude="^(autofs|binfmt_misc|cgroup|cgroup2|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|mqueue|overlay|proc|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tmpfs|tracefs)$"
Notes:
- --no-collector.xfs avoids XFS-related issues in some environments.
- Filesystem excludes reduce noisy metrics from pseudo and container mounts.
- Reload systemd and restart the service:
systemctl daemon-reload
systemctl enable --now prometheus-node-exporter
systemctl status prometheus-node-exporter
- Verify metrics are exposed:
OpenMediaVault (collectd → Prometheus)
OpenMediaVault uses collectd. The write_prometheus plugin exposes metrics over HTTP for Prometheus.
- Install the required library:
- Create
/etc/collectd/collectd.conf.d/prometheus.confwith:
- Restart and verify
collectd:
- If errors occur, check logs:
Prometheus configuration examples
Add jobs to Prometheus scrape_configs to collect from the targets:
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: 'node_exporter'
static_configs:
- targets: ['vm1.example.com:9100', 'vm2.example.com:9100']
- job_name: 'podman_exporter'
static_configs:
- targets: ['podman-host.example.com:12666']
- job_name: 'collectd'
static_configs:
- targets: ['omv-host.example.com:9103']
Reload or restart Prometheus after updating the configuration.
Testing and verification
- Confirm service units are running on each host (
systemctl status). - Use
curlfrom the host and from the Prometheus server to confirm endpoints return metrics. - Check Prometheus web UI → Status → Targets to ensure targets are
UP.
Notes and recommendations
- Tune collector options to reduce noisy or high-cardinality metrics.
- Use hostnames or private IPs appropriate for your environment in Prometheus
targets.