- [root@prometheus]# wget https://github.com/prometheus/prometheus/releases/download/v2.9.2/prometheus-2.9.2.linux-amd64.tar.gz
- [root@prometheus]# tar xvfz prometheus-2.92.linux-amd64.tar.gz
- [root@prometheus]# mv prometheus-2.92.linux-amd64 prometheus
- [root@prometheus]# cd prometheus
- [root@prometheus]# cat prometheus.yaml #basic configuration
Login to the client machine
Download, extract, and running the node exporter
[root@client]# wget https://github.com/prometheus/node_exporter/releases/download/v0.17.0/node_exporter-0.17.0.linux-amd64.tar.gz
[root@client]# tar xzvf node_exporter-0.17.0.linux-amd64.tar.gz
[root@client]# mv node_exporter-0.17.0.linux-amd64.tar.gz node_exporter
[root@client]# cd node_exporter
[root@client]# ./node_exporter
Set node_exporter as a service
#reference : https://devopscube.com/monitor-linux-servers-prometheus-node-exporter/
[root@client]# cp node_exporter /usr/local/bin
[root@client]# useradd -rs /bin/false node_exporter
[root@client]# cat > /etc/systemd/system/node_exporter.service
[Unit] Description=Node Exporter After=network.target [Service] User=node_exporter Group=node_exporter Type=simple ExecStart=/usr/local/bin/node_exporter [Install] WantedBy=multi-user.target
Start daemon, node_exporter and enable autostart
[root@client]# systemctl daemon-reload
[root@client]# systemctl start node_exporter
[root@client]# systemctl status node_exporter
[root@client]# systemctl enable node_exporter
Open firewall port 9100
Make sure you can access node exporter metric via http://
[root@prometheus]# systemctl start grafana-server
[root@prometheus]# systemctl enable grafana-server