Exporting Hostname with Netdata for prometheus

498 Views Asked by At

I am trying to figureout how to allow prometheus to add targets based on hostname and not IP. Currently i am using Netdata as exporter but do not find any information on how to allow hostname of each host to be available in prometheus.

2

There are 2 best solutions below

0
On

A possible solution to your problem could be to use remote-write so that each Netdata writes to the Prometheus node and not the other way around.

Moreover, you could use something like Consul for service discovery.

2
On

If you cannot add the targets to Prometheus manually (either IP or hostname, both is supported) you have to use some kind of service discovery. Some methods included in Prometheus, for example AWS EC2 or Docker Swarm.