Skip to content

Install a 2nd External Node Exporter

Video Lecture

Install a 2nd External Node Exporter

Description

All the steps in this lecture are the same as the earlier lecture where we installed the node-exporter as a service, but this time we also create a specific firewall rule to only allow my main prometheus server to access the metrics data,

iptables -A INPUT -p tcp -s localhost --dport 9100 -j ACCEPT
iptables -A INPUT -p tcp -s [your prometheus server domain name or ip] --dport 9100 -j ACCEPT
iptables -A INPUT -p tcp --dport 9100 -j DROP
iptables -L

And we will also add the scrape config for the new node-exporter to the prometheus.yml

- job_name: 'the name of your new new node-exporter'
  static_configs:
      - targets: ['your new new node-exporters domain name or ip:9100']

and restart the prometheus service.

sudo service prometheus restart
sudo service prometheus status

Comments