General JVM monitoring

JVM monitoring is done mostly via JMX. Definitions and agent configuration directives for monitoring JVM are implemented in jvm.bsh file. This file contains definitions that are universal for all three major JVMs (Sun, JRockit and IBM) so it should be always loaded.

There is one configuration property used by jvm.bsh script that can be occasionally used:

  • zorka.mbs.autoregister - if set to yes, agent will obtain reference to platform mbean server at boot time; note that this is disabled by default as scripts supporting specific application servers are mostly responsible for this;

Memory Pools and GC names in various modes

Depending on vendor and mode, memory pools and garbage collector can have different names.

  • Serial collector (-XX:+UseSerialGC): has the following memory pools: Code Cache, Eden Space, Eden Space, Survivor Space, Tenured Gen, Perm Gen; and garbage collectors: Copy, MarkSweepCompact;

  • Parallel Collector (-XX:+UseParallelGC, -XX:+UseParallelOldGC - with or without serial compaction): Code Cache, PS Eden Space, PS Survivor Space, PS Old Gen, PS Perm Gen; and garbage collectors: PS Scavenge, PS MarkSweep;

  • Concurrent Collector (-XX:+UseConcMarkSweepGC): has the following memory pools: Code Cache, Par Eden Space, Par Survivor Space, CMS Old Gen, CMS Perm Gen; and garbage collectors: ParNew, ConcurrentMarkSweep;

  • Garbage First Collector (-XX:+UseG1GC): has the following memory pools: Code Cache, G1 Eden Space, G1 Survivor Space, G1 Old Gen, G1 Perm Gen; and garbage collectors: G1 Old Generation, G1 Young Generation;

Zabbix templates for JVM monitoring

There are several variants of basic JVM template:

  • Template_Zorka_JVM.xml - standard template for Zabbix 2.0 (uses discovery);

  • Template_Zorka_JVM_static.xml - static template for Zabbix 2.0 (memory pools and GC names parametrized by macros);

  • Template_Zorka_JVM_18.xml - template for Zabbix 1.8;

  • Template_Zorka_JVM_J9_Static.xml - static template for IBM JDK (which lacks some items and has different number of memory pools;