Skip to content

Install Prometheus Exporter

Last reviewed: 2026-09-17

Purpose: Installing and running a Prometheus exporter (node_exporter) as a managed service on Windows and on Linux, and verifying that its metrics endpoint is reachable.


Overview

Prometheus exporters expose metrics in a text format that Prometheus scrapes over HTTP β€” by convention on /metrics. node_exporter is the standard exporter for host-level metrics (CPU, memory, disk, filesystem, network). The steps below install it as a service so it starts with the machine and survives reboots.


Windows Installation

  1. Download the Windows build of node_exporter from the Prometheus downloads page.
  2. Extract the archive to a permanent location, for example C:\Program Files\node_exporter\.
  3. Install a service manager to run it as a Windows service β€” nssm is the usual choice:
choco install nssm
  1. Register the exporter as a service, giving it a service name and the exporter binary path, and setting the listen address as the argument:
nssm install node_exporter "C:\Program Files\node_exporter\node_exporter.exe"
nssm set node_exporter AppParameters "--web.listen-address=:9182"
nssm start node_exporter
  1. Confirm the endpoint responds and returns metrics:
curl http://localhost:9182/metrics
  1. Add a scrape target to the Prometheus configuration:
# prometheus.yml
scrape_configs:
  - job_name: node
    static_configs:
      - targets: ["windows-host:9182"]
    scrape_interval: 15s

Reload Prometheus (or restart it) and check Status β†’ Targets in the Prometheus UI for the target's UP state.


Linux Installation

  1. Download the node_exporter tarball for your architecture from the Prometheus downloads page.
tar xzf node_exporter-*.linux-amd64.tar.gz
sudo mv node_exporter-*.linux-amd64/node_exporter /usr/local/bin/
  1. Create an unprivileged system account for the exporter and give it ownership of the binary:
sudo useradd --system --no-create-home --shell /usr/sbin/nologin prometheus
sudo chown prometheus:prometheus /usr/local/bin/node_exporter
  1. Create the systemd unit:
sudo nano /etc/systemd/system/node_exporter.service
[Unit]
Description=Prometheus Node Exporter
Documentation=https://prometheus.io/docs/introduction/overview/
Wants=network-online.target
After=network-online.target

[Service]
Type=simple
User=prometheus
Group=prometheus
ExecReload=/bin/kill -HUP $MAINPID
ExecStart=/usr/local/bin/node_exporter
SyslogIdentifier=prometheus_node_exporter
Restart=always

[Install]
WantedBy=multi-user.target
  1. Enable and start the service:
sudo systemctl daemon-reload
sudo systemctl enable --now node_exporter
systemctl status node_exporter
  1. Verify the endpoint locally:
curl -s http://localhost:9100/metrics | head

Default ports: node_exporter listens on 9100 on Linux; the Windows service above was configured on 9182 to avoid clashing with other tooling.


Useful Exporter Options

Flag Effect
--web.listen-address=:9100 Address and port to listen on
--collector.<name> Enable an optional collector (systemd, textfile, processes)
--no-collector.<name> Disable a collector that is slow or irrelevant on this host
--web.config.file= TLS and basic-auth settings for the metrics endpoint

Textfile collectors are the common way to publish application-specific metrics from cron jobs and scripts: write a .prom file into /var/lib/node_exporter/textfile_collector/ in the exposition format and the exporter picks it up on the next scrape.


Verification Checklist

  • [ ] Exporter service is running and enabled at boot (systemctl status node_exporter / Windows service list)
  • [ ] curl http://<host>:<port>/metrics returns metric families, not an empty body
  • [ ] A Prometheus target exists for the exporter and shows UP
  • [ ] Host firewall allows the scrape port from the Prometheus server only
  • [ ] Queries such as node_filesystem_avail_bytes and node_memory_MemAvailable_bytes return data

Topics Covered

  • Installing node_exporter on Windows and registering it as a service with nssm
  • Installing node_exporter on Linux with a dedicated system user and a systemd unit
  • Configuring the Prometheus scrape target and confirming it is up
  • Useful exporter flags, custom ports, collectors and the textfile collector
  • Verifying exported metrics with curl and PromQL