prometheus / node_exporter

Exporter for machine metrics
https://prometheus.io/
Apache License 2.0
11.15k stars 2.35k forks source link

Will Node exporter support a new feature that allow --web.listen-address exposes local machine's metrics on another host? #3158

Closed FinaleH closed 1 week ago

FinaleH commented 1 week ago

In production data center of my company, we have two hosts whose network across two subnet, let's call them subnetA and subnetB.
SubnetB has a much stricter ACL and safety regulations than subnetA while our Prometheus Server is installed in subnetA. According to the upper network safety regulation of my company, in that case we cannot tell Prometheus Server to pull metrics from those two hosts directly, but rather set a specific host as a gateway. We can install Prometheus Pushgateway on this gateway host, then use 'curl' with some crontab command to push metrics from target two hosts to this gateway host, and then we can tell Prometheus Server to pull metrics from it. However, it seems a bit complicated to me so I tried to fill the gateway ip address and port in --web.listen-address when I started up node exporter on one of two target hosts, then I got following error:"listen tcp xx.xx.xx.xx:9101: bind: cannot assign requested address". I know the reason of this error is that the ip of gateway host is not binded on target host's network device like eth0 or bond1 .etc. But I wonder is there any posibility that node exporter will support exposing local host's metrics on another host in the future?

SuperQ commented 1 week ago

No, this will not be supported.

There are two good options:

For questions/help/support please use our community channels. There are more people available to potentially respond to your request and the whole community can benefit from the answers provided.

FinaleH commented 1 week ago

@SuperQ Very Helpful, Thanks A Lot !!!