How To Install and Configure Node Exporter Prometheus
We can install and configure node exporter service for Prometheus. We can monitor the remote node machine using Prometheus. you can monitor metrics of a remote machine like CPU, Memory, Network, etc. so
Once you configure, you have to configure in the Prometheus server and make sure you have connectivity between them and ports are allowed in the firewall rule. so
we have created a user with no bash login. so
useradd -m -s /bin/false nodeexpo
you have to extract the package using the below command.
tar -xvf node_exporter-0.18.1.linux-amd64.tar.gz
we can check the content of node_exporter using tree command.
Next, you have to copy the node_exporter binaries to /usr/local/bin/
cp -rfvp node_exporter /usr/local/bin/
Set the permission of node_exporter file to the user and group nodeexpo
chown nodeexpo:nodeexpo /usr/local/bin/node_exporter
we will create a service for node_exporter.
[Unit] Description=Prometheus Node Exporter Wants=network-online.target After=network-online.target ## change user here [Service] User=nodeexpo Group=nodeexpo Type=simple ExecStart=/usr/local/bin/node_exporter [Install] WantedBy=multi-user.target
Reload the daemon and start the services.
systemctl daemon-reload systemctl start node_exporter systemctl status node_exporter
Now you have to check port 9100 should listen by default.
netstat -tnlp | grep 9100
firewall-cmd –permanent –add-port=9100/tcp
we have to add this node details in the Prometheus server file and you can also use the IP address of remote machine instead of the localhost.
Restart the service at the Prometheus server.
systemctl restart prometheus
Go to the Prometheus server and click on status then targets.
As you can we have successfully configured the remote Linux server to monitoring.
We can also configure whether we’re receiving metrics from a remote machine on the Prometheus server.
if you want to test it’s working procedure. Simply go to the URL of the Prometheus server.
Click on the insert metric at the cursor and select your desired metrics.
I have selected node_network_speed_bytes and then click on execute to see the data.
You’re done. prometheus node exporter install service