node exporter does not monitor host interface, but virtual container interface
Closed this issue · 4 comments
We are monitoring a network heavy Cattle application. I noticed that the node-exporters are placed in the managed network, which is also used by the Prometheus container to discover them. However, this has two problems here:
- The host exporter does only monitor it's own virtual eth0 interface, not the interesting host interface
- The nodes show up with a virtual Rancher network IP instead of the interesting host IP address
Something wrong with our deployment? Is it possible to have the node exporters in the host network and still have them found by Prometheus?
Your indeed correct.
The node exporter can be run on the host without issue. As long as your still using rancher DNS service discovery, it's possible to discover services on the host network as long as they've been marked to be discoverable.
This is done in the services panel, or with the configuration label io.rancher.container.dns true
applied in rancher-compose.
More info on the host container discovery: https://docs.rancher.com/rancher/v1.2/en/cattle/labels/
Ah, thanks, I will try that. Any reason this is not the default setting though?
It used to be, essentially is was removed to reduce the externally presented ports that the template would roll out, those metrics could leak info that people don't wish in theory...
If anyone else needs this, the following settings for node-exporters worked for us:
- Network: Host
- DNS: Enable Rancher DNS service discovery: Checked
- Hostname: Use container name