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
- Download the Windows build of
node_exporterfrom the Prometheus downloads page. - Extract the archive to a permanent location, for example
C:\Program Files\node_exporter\. - Install a service manager to run it as a Windows service β
nssmis the usual choice:
- 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
- Confirm the endpoint responds and returns metrics:
- 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
- Download the
node_exportertarball 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/
- 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
- Create the systemd unit:
[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
- Enable and start the service:
sudo systemctl daemon-reload
sudo systemctl enable --now node_exporter
systemctl status node_exporter
- Verify the endpoint locally:
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>/metricsreturns 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_bytesandnode_memory_MemAvailable_bytesreturn data
Topics Covered
- Installing
node_exporteron Windows and registering it as a service withnssm - Installing
node_exporteron 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
curland PromQL