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.