Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upDo we have a way to get host names in metrics scrapped in Docker swarm #5410
Comments
This comment has been minimized.
This comment has been minimized.
|
I suppose that you're using the DNS service discovery. You could use relabeling with relabel_configs:
- source_labels: [__meta_dns_name]
action: replace
target_label: instanceSee also https://www.robustperception.io/controlling-the-instance-label I'm closing it for now. If you have further questions, please use our user mailing list, which you can also search. |
simonpasquier
closed this
Apr 2, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
saiharshitachava commentedMar 27, 2019
I am running node exporter as a global service in Docker swarm and I would like to get the hostnames in metrics scrapped using prometheus.
I'm currently using the A protocol in prometheus.yml which is giving me the container IP's .But I would need the hostnames of the instances as I have many hosts to monitor
I currently see them as below.
I would need hostnames instead of 10.0.33.243,10.0.33.244
Any help?