Option 1: Install via Ubuntu 22.04 package repo (Jammy Jellyfish)

If you're running Ubuntu 22.04 or later, the easiest method is through the APT package manager:

root@data1:~# apt install prometheus-node-exporter

This will install and configure the Node Exporter as a service automatically.


Option 2: Manually install from binary (if not using APT)

If you need a custom setup or are on a system without package access, you can manually install the Node Exporter from a tarball.

Step 1: Download the latest release from GitHub

root@data1:~# wget https://github.com/prometheus/node_exporter/releases/download/v*/node_exporter-*.*-amd64.tar.gz

You can replace the asterisks with the actual version number, such as v1.7.0.

Step 2: Extract the tarball

root@data1:~# tar xvfz node_exporter-*.*-amd64.tar.gz  

Step 3: Navigate to the extracted folder

root@data1:~# cd node_exporter-*.*-amd64

Step 4: Start the Node Exporter

root@data1:~/node_exporter-*.*-amd64# ./node_exporter

You should now see logs similar to this, confirming that the exporter is up and running on port 9100:

INFO[0000] Starting node_exporter (version=0.16.0, branch=HEAD, revision=d42bd70...)  source="node_exporter.go:82"
INFO[0000] Listening on :9100                            source="node_exporter.go:111"

Verifying Node Exporter Metrics

To make sure the exporter is serving metrics correctly, open a new terminal tab or background the previous command and run:

root@data1:~# curl http://localhost:9100/metrics

If successful, you'll get a list of Prometheus metrics, like so:

# HELP go_gc_duration_seconds A summary of the GC invocation durations.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 3.8996e-05
...

To filter for system-specific metrics (prefixed with node_):

root@data1:~# curl http://localhost:9100/metrics | grep "node_"

Success! Node Exporter is now running and exposing system-level metrics that Prometheus can scrape on port 9100.

Let me know when you’re ready for the next article.