Install Second Prometheus Node Exporter
Video Lecture
Description
I will install a Prometheus Node Exporter on a different server and connect to it using the main Prometheus service.
On the other server install it,
1 |
|
Check its status.
1 |
|
It has created a specific user called prometheus
1 |
|
It is now exposing the metrics endpoint on http://[your domain or ip]:9100
We can create a scrape config on the Prometheus server that retrieves metrics from that URL.
But since my new node exporter is accessible from the internet, I will block port 9100.
1 2 |
|
And add an Nginx location
to an existing website config I already have on this server that already has an SSL certificate bound.
1 |
|
1 2 3 4 5 6 7 |
|
If you don't want to use the Nginx reverse proxy method, you could instead restrict access to the port for a specific ip address using iptables
. Note that the messages will not be encrypted as they travel across the internet unless you provide another solution.
1 2 3 |
|
Next,
Go back onto the main Prometheus server and edit the existing scrape config for node
and add the new metrics
endpoint for the other server.
1 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
Prometheus Course
If you want to try a more detailed course on Prometheus, then you can visit my Prometheus tutorials.