-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
I have a java app which running in Kubernetes, and config resource limit, here,
resources:
limits:
cpu: 2
memory: 4Gi
requests:
cpu: 2
memory: 4Gi
when I deploy jmx_exporter whith java agent mode, the metrics show here,
java_lang_OperatingSystem_AvailableProcessors 2.0
java_lang_OperatingSystem_TotalPhysicalMemorySize 5.0475278336E10
The jmx_exporter show AvailableProcessors = 2.0 , the same size in pod resources config, but the total physical memory size = 47G (5.0475278336E10) , which is way big than pod resources config (4G).
The question is : does jmx_exporter acknowledge the existence of kubernetes pod resources config , and why cpu and memory show different result.
env:
- java: openjdk 1.8.0-242
- java app command line: java -javaagent:./jmx_prometheus_javaagent-1.2.0.jar=8989:jmx_exporter_config.yaml -Xms2048m -Xmx3072m xxx.jar
- jmx_prometheus_javaagent: 1.2.0
- kubernetes: 1.21.6
- docker: 20.10.7
- kubernetes node resource: memory 47G / cpu 16vCore
- jmx_exporter_config.yaml:
rules:
- pattern: ".*"
Reactions are currently unavailable