Prometheus JMX exporter

107 views
Skip to first unread message

Aman Gupta

unread,
Oct 16, 2020, 6:41:56 AM10/16/20
to Prometheus Users
Hi,

Can anyone help me with prometheus JMX exporter.

Problem statement: Pod name is not available in prometheus jmx dashboard

Stack:
Promethues (running out k8s cluster) standalone
springboot service: Running in k8s cluster (exposed on node port)
JMX : enabled via actuator (data available over ip:nodeport/actuator/prometheus)

ip: this IP is of consul ( we use consul for service discovery)

Now issue is jmx data doesn't have pod name by default. and 
 
sample data:
 jvm_memory_used_bytes{area="nonheap",id="CodeHeap 'profiled nmethods'",} 4.4841344E7
jvm_memory_used_bytes{area="heap",id="G1 Survivor Space",} 2097152.0
jvm_memory_used_bytes{area="heap",id="G1 Old Gen",} 1.42057592E8
jvm_memory_used_bytes{area="nonheap",id="Metaspace",} 1.29879728E8
jvm_memory_used_bytes{area="nonheap",id="CodeHeap 'non-nmethods'",} 1463552.0

Is there any dashboard that give pod name??

Also i have added custom metrics 
sample data
jvm_memory_used_bytes{area="heap",host="cabis-web-service-667bc94578-z664m",id="G1 Eden Space",} 5.78813952E8
jvm_memory_used_bytes{area="heap",host="cabis-web-service-667bc94578-z664m",id="G1 Old Gen",} 2.18199984E8
jvm_memory_used_bytes{area="nonheap",host="cabis-web-service-667bc94578-z664m",id="Code Cache",} 8.2859392E7
jvm_memory_used_bytes{area="nonheap",host="cabis-web-service-667bc94578-z664m",id="Metaspace",} 1.13843944E8

Is there any way to make this host visible on grafana dashboard?

1st: is more preferable if possible.

Barry

unread,
Jan 14, 2021, 1:28:55 PM1/14/21
to Prometheus Users
Same question here, in addition, if there is no way to show pod name, then how the metrics reported from each pod are aggregated.
Reply all
Reply to author
Forward
0 new messages