Hello,
I have a Docker Container running Java 11 and I'm attempting to get Garbage Collection metrics via JMX. I'm able to get other metrics from the container like Heap Memory but unfortunately Garbage Collection isn't working and I get a message saying 'Object or Attribute not found' in my Zabbix items.
The Garbage Collection metrics are working on non-dockerised containers running springboot and tomcat on Java 8.
I'm running Zabbix version 4.0.11 and the Docker container is running on a server running CentOS 7.7
These are the garbage collection strings that Zabbix is using. Perhaps the strings should be different for Java 11?
jmx["java.lang:type=GarbageCollector,name=ConcurrentMa rkSweep","CollectionCount"]
jmx["java.lang:type=GarbageCollector,name=Copy","Colle ctionTime"]
jmx["java.lang:type=GarbageCollector,name=Copy","Colle ctionCount"]
jmx["java.lang:type=GarbageCollector,name=MarkSwee pCom pact","CollectionTime"]
jmx["java.lang:type=GarbageCollector,name=MarkSwee pCom pact","CollectionCount"]
jmx["java.lang:type=GarbageCollector,name=ParNew","Col lectionTime"]
jmx["java.lang:type=GarbageCollector,name=ParNew","Col lectionCount"]
jmx["java.lang:type=GarbageCollector,name=PS MarkSweep","CollectionTime"]
jmx["java.lang:type=GarbageCollector,name=PS MarkSweep","CollectionCount"]
jmx["java.lang:type=GarbageCollector,name=PS Scavenge","CollectionTime"]
jmx["java.lang:type=GarbageCollector,name=PS Scavenge","CollectionCount"]
This is the JDK_JAVA_OPTIONS string I'm using in the cotainer. The hostname has been replaced by a dummy IP address:
JDK_JAVA_OPTIONS=-Xlog:gc*,safepoint:file=/app/logs/gc.log:time,level,tags:filecount=10,filesize=10M -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8000 -Dcom.sun.management.jmxremote.rmi.port=8000 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=10.10.10.10
Any help would be appreciated.
Regards,
Nick
I have a Docker Container running Java 11 and I'm attempting to get Garbage Collection metrics via JMX. I'm able to get other metrics from the container like Heap Memory but unfortunately Garbage Collection isn't working and I get a message saying 'Object or Attribute not found' in my Zabbix items.
The Garbage Collection metrics are working on non-dockerised containers running springboot and tomcat on Java 8.
I'm running Zabbix version 4.0.11 and the Docker container is running on a server running CentOS 7.7
These are the garbage collection strings that Zabbix is using. Perhaps the strings should be different for Java 11?
jmx["java.lang:type=GarbageCollector,name=ConcurrentMa rkSweep","CollectionCount"]
jmx["java.lang:type=GarbageCollector,name=Copy","Colle ctionTime"]
jmx["java.lang:type=GarbageCollector,name=Copy","Colle ctionCount"]
jmx["java.lang:type=GarbageCollector,name=MarkSwee pCom pact","CollectionTime"]
jmx["java.lang:type=GarbageCollector,name=MarkSwee pCom pact","CollectionCount"]
jmx["java.lang:type=GarbageCollector,name=ParNew","Col lectionTime"]
jmx["java.lang:type=GarbageCollector,name=ParNew","Col lectionCount"]
jmx["java.lang:type=GarbageCollector,name=PS MarkSweep","CollectionTime"]
jmx["java.lang:type=GarbageCollector,name=PS MarkSweep","CollectionCount"]
jmx["java.lang:type=GarbageCollector,name=PS Scavenge","CollectionTime"]
jmx["java.lang:type=GarbageCollector,name=PS Scavenge","CollectionCount"]
This is the JDK_JAVA_OPTIONS string I'm using in the cotainer. The hostname has been replaced by a dummy IP address:
JDK_JAVA_OPTIONS=-Xlog:gc*,safepoint:file=/app/logs/gc.log:time,level,tags:filecount=10,filesize=10M -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8000 -Dcom.sun.management.jmxremote.rmi.port=8000 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=10.10.10.10
Any help would be appreciated.
Regards,
Nick
Comment