How to change Node Exporter port

Node Exporter by default use port 9100. You may need to use another port for Node Exporter if port 9100 is already used by another program on your server. On an OVH VPS, noderig was running in port 9100 and Node Exporter failed to start. To fix the issue, i had to run Node Exporter on a different port.

To change Node Exporter port, edit file

Find line

Replace it with

In the above line, 9101 is the new Node Exporter port. You can change it to any other port as required.

Here is the complete code

Reload systemd

Restart node exporter

You can verify node_exporter is running with the command

Leave a Reply

Your email address will not be published. Required fields are marked *