The Prometheus node exporter role we use for setting up monitoring on all of our hosts creates an nginx config that sometimes collides with other things also deployed in that host, usually when they support traffic on port 443/80.
This is due to the fact that the node exporter role uses the inventory_hostname to fill in the nginx config, but maybe the hostname used for monitoring is not the one used for something else. Example: notebook.ooni.org is usually used for actually using the jupyter notebook server. notebook1.htz-fns.prod.ooni.nu on the other hand is used for monitoring
The result is that two Nginx server blocks are created for the same port and nginx ignores one of them
The task is to find a way to fix the address used for monitoring on a host regardless of how it's called when running the ansible command. This can be done by changing the node exporter port or setting a different domain for the same host
The Prometheus node exporter role we use for setting up monitoring on all of our hosts creates an nginx config that sometimes collides with other things also deployed in that host, usually when they support traffic on port 443/80.
This is due to the fact that the node exporter role uses the
inventory_hostnameto fill in the nginx config, but maybe the hostname used for monitoring is not the one used for something else. Example: notebook.ooni.org is usually used for actually using the jupyter notebook server.notebook1.htz-fns.prod.ooni.nuon the other hand is used for monitoringThe result is that two Nginx server blocks are created for the same port and nginx ignores one of them
The task is to find a way to fix the address used for monitoring on a host regardless of how it's called when running the ansible command. This can be done by changing the node exporter port or setting a different domain for the same host