Step 1: Downloading the Node Exporter
Begin by visiting the official Prometheus downloads page and selecting the Node Exporter. Choose the desired version and either download the binary directly or copy the URL for use with wget.
Verify the file’s integrity by comparing its SHA256 checksum with the one provided on the download page.
Step 2: Extracting the Archive
Extract the downloaded tar file using the tar command:node_exporter-1.3.1.linux-amd64 containing the executable and additional files (LICENSE and NOTICE). Change to the directory with:
Step 3: Running the Node Exporter
Inside the directory, start the Node Exporter by running its executable:Make sure that port 9100 is open in your firewall settings to allow Prometheus to scrape the metrics.
Step 4: Verifying the Installation
To confirm that the Node Exporter is running correctly, use curl to request the metrics endpoint:http://localhost:9100/metrics
Example with a Different Version
The process remains the same if you are using a different version, such asnode_exporter-1.4.0.linux-amd64. Your working directory may resemble:
Conclusion
With these steps, the Prometheus Node Exporter is now set up to collect host metrics, allowing Prometheus to scrape them from the /metrics endpoint. This installation is a key component for monitoring system performance and reliability.For further customization and enhancements, explore additional Prometheus exporters and check out the Prometheus Documentation.