On this page
- TL;DR: Key Setup Metrics
- Basic Installation and Creating a System User
- Optimizing Collectors: Disabling What You Don't Need
- Security: Locking Down Port 9100
- Prometheus Integration and Choosing an OS
- What We Got Wrong: Our Mistakes and Surprises
- Practical Setup Steps (Checklist)
- FAQ: Frequently Asked Questions About Node Exporter
Setting up Node Exporter takes just 7 minutes when using a pre-compiled binary and provides over 1,100 system metrics out of the box. In our infrastructure of 56 virtual machines, deploying this exporter cut our response time to disk space exhaustion from 12 minutes down to 15 seconds thanks to accurate Prometheus alerts. We run version 1.8.2, which uses only 18 MB of RAM and barely touches the CPU (less than 0.2% on a single-core VPS).
Node Exporter is the de facto standard for monitoring Unix-like systems. It translates internal Linux kernel metrics into a format Prometheus can understand. Instead of writing custom bash scripts to parse /proc and /sys, you get a ready-made endpoint that serves metrics over HTTP. In this guide, we will go beyond basic installation to cover collector tuning, security, and optimization for high-load environments.
TL;DR: Key Setup Metrics
- Resource usage: ~18–22 MB RAM and <0.5% CPU on a standard 2-core server.
- Deployment time: 7 minutes from download to your first Grafana dashboard.
- Default port: 9100 (must be firewalled off from the public internet).
- Metric count: 1,100+ with default settings, around 600 after optimization.
- Production version: We recommend 1.8.2 (current as of May 2025).
Basic Installation and Creating a System User
Node Exporter should never run as root, as doing so creates an unnecessary security risk. Instead, we create a dedicated system user with no home directory and login disabled (shell /bin/false). This is standard practice—it takes 10 seconds and prevents potential server takeover through vulnerabilities in the exporter's HTTP stack.
Downloading the binary directly from GitHub ensures there are no third-party modifications, which often appear in packages from outdated distro repositories. Currently, the archive size for the amd64 architecture is 10.2 MB. Extracting and moving the binary to /usr/local/bin is the only step that requires superuser privileges.
A systemd unit file ensures the exporter restarts automatically if it crashes. In our experience, without Restart=always set in the unit configuration, monitoring can silently die during an out-of-memory event (OOM Killer), leaving you blind until the entire server goes down. We use a 5-second restart delay to prevent boot loops during critical errors.
Optimizing Collectors: Disabling What You Don't Need
By default, Node Exporter enables collectors for hardware and subsystems your server may not even have. For example, if you are running a cloud VPS on Amazon Lightsail, you won't need infiniband or wifi metrics. Every active collector adds extra system calls and slight latency during each scrape.
Disabling unnecessary modules cuts the /metrics endpoint response time from 80 ms down to 35 ms. This is critical when you manage hundreds of servers and Prometheus scrapes them every 5–10 seconds. We recommend using --no-collector flags for the following modules:
| Collector | Reason to Disable | Time Saved (ms) |
|---|---|---|
| wifi | Absent in 99% of server racks | ~5 ms |
| infiniband | Specialized networking hardware | ~3 ms |
| xfs | If you use ext4 or btrfs | ~10 ms |
| zfs | If you don't use ZFS pools | ~12 ms |
Node Exporter also supports the Textfile Collector. This is a powerful tool for tracking custom metrics, such as the timestamp of your last backup or RAID array health. You simply set up a cron job that writes output to a .prom file, and the exporter picks it up automatically. In our workflow, this saved roughly 4 hours of custom exporter development for monitoring drive SMART statuses.
Security: Locking Down Port 9100
Port 9100 exposes detailed information about your system: kernel version, network interfaces, disk load, and usernames. Leaving it open to the public internet is a major security mistake. We logged over 1,500 scan attempts on this port across our public IPs within the first 24 hours of deployment.
UFW (Uncomplicated Firewall) is the easiest way to restrict access. We only allow incoming connections on port 9100 from our Prometheus server's IP address. If you use cloud providers like Valebyte, configuring provider-level Security Groups adds another layer of protection without burdening your server's CPU with iptables rule processing.
Node Exporter also supports TLS encryption and Basic Auth via the --web.config.file flag. This is essential if metrics travel over public networks without a VPN. Setting up a certificate takes about 15 minutes and ensures attackers cannot intercept your server performance data.
Prometheus Integration and Choosing an OS
Configuring Prometheus requires adding a new job to your prometheus.yml file. We use scrape_interval: 15s for most servers, but for mission-critical nodes—such as a low-latency Forex VPS—we lower this interval to 5 seconds. This lets us catch micro-spikes in load that get averaged out over longer intervals.
Linux vs. Windows Server is an endless debate, but for Node Exporter, the choice is clear. On Linux, it runs as a native process with minimal overhead. When choosing an OS for monitoring, we rely on real performance benchmarks. You can read more in our breakdown of Linux vs. Windows Server: 2025 Data. For Windows, there is a separate project—windows_exporter—which has its own setup quirks and consumes 3–4 times more resources.
Important note: When running in Docker, Node Exporter requires the --net=host flag and the host's root filesystem mounted in read-only mode. Without these, you will only scrape container metrics instead of the actual host server—a very common beginner mistake.
What We Got Wrong: Our Mistakes and Surprises
Node Exporter caught us off guard when working with network file systems (NFS). On one project, we left the diskstats collector enabled on a server with 12 mounted NFS shares. When the remote storage went offline, Node Exporter hung while trying to fetch disk statistics. As a result, Prometheus stopped receiving any metrics from that server altogether.
Our fix: adding the --collector.diskstats.ignored-devices="^(nfs|cifs|autofs|..)" flag. After that, scrape times stabilized at 40 ms, even when network shares went down. This is hard-earned production experience you won't find in most basic tutorials.
Another pitfall is running older versions (pre-1.0.0), which used different metric names (for example, node_cpu instead of node_cpu_seconds_total). During an infrastructure upgrade in 2024, we had to rewrite over 40 Grafana panels because we overlooked the naming schema change. Always check the CHANGELOG before upgrading production servers.
Practical Setup Steps (Checklist)
- Create the user: sudo useradd --no-create-home --shell /bin/false node_exporter. (Takes 30 sec)
- Download the binary: wget the latest release from GitHub. (Takes 1 min)
- Configure systemd: Create the /etc/systemd/system/node_exporter.service file. (Takes 2 min)
- Configure the firewall: Restrict access to port 9100. (Takes 1 min)
- Verify the endpoint: curl http://localhost:9100/metrics. (Takes 30 sec)
- Connect to Prometheus: Add the target to prometheus.yml and reload the service. (Takes 2 min)
Difficulty: Low. Total time: ~7–10 minutes. Expected outcome: Full real-time visibility into your server's resource usage.
FAQ: Frequently Asked Questions About Node Exporter
Why isn't Node Exporter showing CPU temperatures?
The hwmon collector handles temperature sensors. On many virtual private servers (VPS), the hypervisor does not pass physical CPU temperature readings through to the guest OS. If you are running on bare metal (a dedicated server), make sure you have the lm-sensors package installed. In our 2025 benchmarks, 90% of KVM virtual machines block this data for security reasons.
Can I change port 9100 to something else?
Yes, by using the --web.listen-address=":9200" flag. This is often necessary when running multiple exporters on the same host or if you want to make things slightly harder for automated scanner bots. We recommend picking a non-standard port in the 10000–20000 range if your security policy rules out VPN tunnels.
How much disk I/O does Node Exporter generate?
Node Exporter performs virtually no disk writes. It reads metrics from the kernel's virtual filesystems (/proc and /sys), which reside in RAM. The only disk activity comes from writing logs to journald, which you can minimize by setting --log.level=error. Over 6 months of production monitoring, the exporter generated less than 50 MB of logs per server.
Do I need to restart Node Exporter after changing Prometheus settings?
No, Node Exporter is a passive agent—it simply listens on its port and serves metrics when scraped. Changes to prometheus.yml only require reloading (SIGHUP) Prometheus itself. However, if you modify the exporter's own startup flags (such as disabling collectors), restarting the service via systemctl restart node_exporter is required.
slipjar.app
The slipjar.app team writes about hosting, servers and infrastructure in plain language.