Add target node-exporter

Adding target’s using node-exporter

We can add targets which are nothing the nodes we wish to monitor in our Prometheus server.

  1. To add the target we have to modify vi /etc/prometheus/prometheus.yml and the target sections of the static_config section.

I have added my personal machine to the targets sections in the screenshot below. Note, that you should know your target machine’s IP address and port 9100 should open it. Make sure to maintain proper indentation too and save the file.

  1. Now we have added the IP address in the prometheus.yml file, it’s time to download the appropriate node and exporter and start it on the target machine from this link. https://github.com/prometheus/node_exporter/releases

  2. To Verify whether the targeted machine is to be monitored or not, Hit this endpoint http://lcoalhost:9090/targets

  3. You can verify its metrics too using http://<target-IP>:9090/targets in my case. http://10.228.3.232:9100/metrics