Exporting Hostname with Netdata for prometheus

]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.

From the Prometheus documentation:

JSON json [ { "targets": [ "<host>", ... ], "labels": { "<labelname>": "<labelvalue>", ... } }, ... ]
YAML yaml - targets: [ - '<host>' ] labels: [ <labelname>: <labelvalue> ... ]

  • <host> : a valid string consisting of a hostname or IP followed by an optional port number

So, it should just work with hostnames. There is also an example with a hostname:

  - job_name: prometheus
      - targets: ['localhost:9090']