write hostname in jmx exporter

66 views
Skip to first unread message

aadarsh verma

unread,
Jul 26, 2023, 9:11:37 AM7/26/23
to Prometheus Users
I am running the exporter from every pod inside k8s
I want to differentiate the data by pod so I want the exporter to ship hostname parameter that prints the pod name 

how can i do this without modifying the source code if possible 

Ben Kochie

unread,
Jul 26, 2023, 9:19:05 AM7/26/23
to aadarsh verma, Prometheus Users
This is not possible. Target labels are assigned by Prometheus. This is part of "relabelings" in your ServiceMonitor spec.

Also, you already get this via the `pod` label.

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/3fa05e64-f60f-40ad-8d4a-33cda89693afn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages