Use it to monitor Linux hosts.
Host Metrics with node_exporter
node_exporter exposes Linux host metrics — CPU, memory, disks, filesystems, network, load — on port 9100 for Prometheus.
1. Up: curl -s localhost:9100/metrics | grep node_load1.
2. CPU busy: 1 - avg by (instance)(rate(node_cpu_seconds_total{mode="idle"}[5m])).
3. Memory: node_memory_MemAvailable_bytes.
4. Disk fill: node_filesystem_avail_bytes.
5. Network errors: node_network_receive_errs_total.
kernel /proc,/sys → node_exporter → scrape → dashboards/alerts
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 How to verify Verify boundary
Compare node_exporter values with top, free and df on the host. Alert on filesystem space and disk saturation.
Step 2 Common failures Narrow the fault
Monitoring MemFree instead of MemAvailable causes false alarms. Including tmpfs and overlay filesystems adds noise. Running the exporter in a container without host mounts reports container values.
Use rate() on CPU and network counters. Exclude pseudo filesystems. Enable the textfile collector for custom host metrics.
curl -s localhost:9100/metrics | grep node_load1— first check for this topiccurl -s localhost:9090/-/ready— Prometheus readycurl -s 'localhost:9090/api/v1/query?query=up'— scrape targets up/downpromtool check config prometheus.yml— config valid
ReferenceWhat it is1 section · depth on demand
How it works
node_exporter reads /proc and /sys on each scrape. Collectors can be enabled or disabled with flags. The textfile collector exposes custom metrics written by scripts.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
The queries most host dashboards need
# CPU busy %, per instance
100 * (1 - avg by (instance) (rate(node_cpu_seconds_total{mode="idle"}[5m])))
# Memory actually available (not MemFree)
node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes
# Filesystem space left, real filesystems only
node_filesystem_avail_bytes{fstype!~"tmpfs|overlay|squashfs"} / node_filesystem_size_bytes
# Disk busy (utilisation) and average I/O wait per operation
rate(node_disk_io_time_seconds_total[5m])
rate(node_disk_read_time_seconds_total[5m]) / rate(node_disk_reads_completed_total[5m])
# Network throughput and errors
rate(node_network_receive_bytes_total{device!~"lo|veth.*"}[5m]) * 8
rate(node_network_receive_errs_total[5m])
# Pressure stall information (kernel 4.20+): share of time tasks waited
rate(node_pressure_cpu_waiting_seconds_total[5m])
Reading them correctly
| Metric | Trap |
|---|---|
MemFree | Linux uses free memory for cache; low MemFree is normal — use MemAvailable |
| Load average | Includes tasks in uninterruptible I/O; compare with CPU count, and check PSI |
io_time near 100 % | On SSD/NVMe with parallel queues this does not mean saturated — look at latency |
| Filesystem % used | Inodes can run out first: node_filesystem_files_free |
Alerts that matter
predict_linear(node_filesystem_avail_bytes{fstype!~"tmpfs|overlay"}[6h], 4*3600) < 0 # full within 4 h
node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes < 0.05
increase(node_vmstat_oom_kill[15m]) > 0
node_timex_offset_seconds > 0.05 or node_timex_sync_status == 0
Running it
Run it as a systemd service on hosts, or as a DaemonSet with hostNetwork, hostPID and the host root mounted read-only (--path.rootfs=/host) in Kubernetes. Enable extra collectors deliberately (--collector.systemd, --collector.processes) and use the textfile collector for site-specific metrics such as backup age.
Common mistakes
- Scraping node_exporter without filesystem/collector filters.
ReferenceConfiguration & state1 section · depth on demand
Setup and key metrics
node_exporter --collector.systemd --collector.textfile.directory=/var/lib/node_exporter
curl -s localhost:9100/metrics | grep node_load1
| Query | Shows |
|---|---|
1 - avg by (instance)(rate(node_cpu_seconds_total{mode="idle"}[5m])) | CPU use |
node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes | Free memory ratio |
node_filesystem_avail_bytes{fstype!~"tmpfs"} | Free disk |
rate(node_disk_io_time_seconds_total[5m]) | Disk busy |
rate(node_network_receive_errs_total[5m]) | NIC errors |
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.