Prometheus Node Exporter
Capture Linux Host Metrics
- Create a Non-Privilege user "node-exporter" which will run Node Exporter
- Set Password for user "node-exporter"
- Login as Non-Privilege user "node-exporter"
- Download Node Exporter Tarball from Official Prometheus website
- Extract Node Exporter tarball
- Verify the contents of the Node Exporter
- Start the Node Exporter
- If you see the above output, then Node Exporter has started successfully and capturing Linux Host Metrics.
# useradd node-exporter
# passwd node-exporter
# wget https://github.com/prometheus/node_exporter/releases/download/v1.2.2/node_exporter-1.2.2.linux-amd64.tar.gz
--2021-08-07 21:02:10-- https://github.com/prometheus/node_exporter/releases/download/v1.2.2/node_exporter-1.2.2.linux-amd64.tar.gz
Resolving github.com (github.com)... 140.82.114.3
Connecting to github.com (github.com)|140.82.114.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-releases.githubusercontent.com/9524057/28598a7c-d8ad-483d-85ba-8b2c9c08cf57?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210808%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210808T010210Z&X-Amz-Expires=300&X-Amz-Signature=e72cdc4772cf995d32d88fcd7f6aa99df7c7481aacaec4d8246229b21edd8193&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=9524057&response-content-disposition=attachment%3B%20filename%3Dnode_exporter-1.2.2.linux-amd64.tar.gz&response-content-type=application%2Foctet-stream [following]
--2021-08-07 21:02:11-- https://github-releases.githubusercontent.com/9524057/28598a7c-d8ad-483d-85ba-8b2c9c08cf57?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210808%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210808T010210Z&X-Amz-Expires=300&X-Amz-Signature=e72cdc4772cf995d32d88fcd7f6aa99df7c7481aacaec4d8246229b21edd8193&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=9524057&response-content-disposition=attachment%3B%20filename%3Dnode_exporter-1.2.2.linux-amd64.tar.gz&response-content-type=application%2Foctet-stream
Resolving github-releases.githubusercontent.com (github-releases.githubusercontent.com)... 185.199.108.154, 185.199.109.154, 185.199.110.154, ...
Connecting to github-releases.githubusercontent.com (github-releases.githubusercontent.com)|185.199.108.154|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8898481 (8.5M) [application/octet-stream]
Saving to: node_exporter-1.2.2.linux-amd64.tar.gz
100%[====================================================================================================================>] 8,898,481 5.64MB/s in 1.5s
2021-08-07 21:02:12 (5.64 MB/s) - node_exporter-1.2.2.linux-amd64.tar.gz saved [8898481/8898481]
# tar xfz node_exporter-1.2.2.linux-amd64.tar.gz
# ls -l node_exporter-1.2.2.linux-amd64
total 18080
-rw-r--r-- 1 node-exporter node-exporter 11357 Aug 6 09:49 LICENSE
-rwxr-xr-x 1 node-exporter node-exporter 18494215 Aug 6 09:45 node_exporter
-rw-r--r-- 1 node-exporter node-exporter 463 Aug 6 09:49 NOTICE
# ./node_exporter-1.2.2.linux-amd64/node_exporter
....
level=info ts=2021-08-08T01:10:40.082Z caller=node_exporter.go:115 collector=uname
level=info ts=2021-08-08T01:10:40.082Z caller=node_exporter.go:115 collector=vmstat
level=info ts=2021-08-08T01:10:40.082Z caller=node_exporter.go:115 collector=xfs
level=info ts=2021-08-08T01:10:40.082Z caller=node_exporter.go:115 collector=zfs
level=info ts=2021-08-08T01:10:40.082Z caller=node_exporter.go:199 msg="Listening on" address=:9100