# Memory checks # ============================================ include common.cfg # Base definition for memory relative checks # (i.e. checks with a base value). Should # not be used directly Use = relative_base($0,$1) Unit = B BaseUnit = B # Relative Heap Memory used by the application. This # is the ratio between used heap memory and the maximal # available heap memory # $0: Critical value (optional) # $1: Warning value (optional) Use = memory_relative_base($0,$1) Value = java.lang:type=Memory/HeapMemoryUsage/used Base = java.lang:type=Memory/HeapMemoryUsage/max Label = Heap-Memory: $BASE Name = Heap MultiCheckPrefix # Relative non-heap memory. The JVM has memory other than the heap, # referred to as non-heap memory. It stores per-class structures such # as runtime constant pool, field and method data, and the code for # methods and constructors, as well as interned Strings. More detailed # information can be obtained from the pool checks defined below # $0: Critical value (optional) # $1: Warning value (optional) Use = memory_relative_base Value = java.lang:type=Memory/NonHeapMemoryUsage/used Base = java.lang:type=Memory/NonHeapMemoryUsage/max Label = Non-Heap-Memory: $BASE Name = Non-Heap MultiCheckPrefix # Java 8 Memory check for MetaSpace. Metaspace is typically unbounded # and grows into native (OS) memory. Hence, an absolute thresshold is used # here which by default is (C: 80M, W: 60M). Unit = B Label = %.2v %u meta space used Value = java.lang:name=Metaspace,type=MemoryPool/Usage/used Name = MetaSpace Critical = ${0:83886080} Warning = ${1:62914560} MultiCheckPrefix # Java 8 Memory check for MetaSpace with an upper configued (-XX:MetaSpaceSize) Use = memory_relative_base Value = java.lang:name=Metaspace,type=MemoryPool/Usage/used Base = java.lang:name=Metaspace,type=MemoryPool/Usage/max Label = MetaSpace: $BASE Name = MetaSpace MultiCheckPrefix # ============================================================= # Memory pool checks. These are specific to a Sun/Oracle JVM. # Base definition for pool based checks # $0: Label prefix and name to used # $1: Critical value (optional) # $2: Warning value (optional) Use = memory_relative_base($1,$2) Value = java.lang:type=MemoryPool,name=$0/Usage/used Base = java.lang:type=MemoryPool,name=$0/Usage/max Label = $0 : $BASE Name = $0 # Base definition for garbage collection count # This checks count the number of garbage collections per # minute # $0: Name of garbage collector (used as Label as well) # $1: Critical value (default: 30) # $2: Warning value (default: 20) Use = count_per_minute("GC count") Value = java.lang:type=GarbageCollector,name=$0/CollectionCount Label = $0 : $BASE Name = $0 count Critical = ${1:30} Warning = ${2:20} # Base definition for garbage time measurements # This checks measure the ratio the garbage collection takes from a minute # (e.g. how many percent of a minute is used for garbage collecting) # $0: Name of garbage collector (used as Label as well) # $1: Critical value in percent (default: 20) # $2: Warning value in percent (default: 10) # WARNING: THIS CHECK HAS CHANGED IN 1.08. Remove the 'Base' and adapt the label # to obtain the old behaviour. Value = java.lang:type=GarbageCollector,name=$0/CollectionTime Label = %2.2r% GC Overhead Name = $0 time Delta 60 # Next line switches on relative checking to get the percentual overhead # for a garbage collection Base = 60000 Critical = ${1:20} Warning = ${2:10} # The paralled garbage collectors and memory # pools switched on with -XX:+UseParallelGC. # Used by 64bit server VMs by default. Check = memory_pool_base("PS Eden Space",100,100) Check = memory_pool_base("PS Survivor Space",100,100) Check = memory_pool_base("PS Old Gen") Check = memory_pool_base("PS Perm Gen") Check = memory_gc_count_base("PS Scavenge") Check = memory_gc_count_base("PS MarkSweep") # Since 1.08: Relative time instead of absolute values. Check = memory_gc_time_base("PS Scavenge") Check = memory_gc_time_base("PS MarkSweep") # Garbage collectors and memory pools used for # -XX:+UseConcMarkSweepGC and -XX:+UseParNewGC # used by default by OS X, client vm. Check = memory_pool_base("Par Eden Space") Check = memory_pool_base("Par Survivor Space") Check = memory_pool_base("CMS Old Gen") Check = memory_pool_base("CMS Perm Gen") Check = memory_gc_count_base("ParNew") Check = memory_gc_count_base("ConcurrentMarkSweep") # Since 1.08: Relative time instead of absolute values. Check = memory_gc_time_base("ParNew") Check = memory_gc_time_base("ConcurrentMarkSweep") # Garbage collector and memory pools used # when -XX:+UseSerialGC is used. Seems to be the default # on linux for -client and -server VMs Check = memory_pool_base("Eden Space") Check = memory_pool_base("Survivor Space") Check = memory_pool_base("Tenured Gen") Check = memory_pool_base("Perm Gen") Check = memory_gc_count_base("Copy") Check = memory_gc_count_base("MarkSweepCompact") # Since 1.08: Relative time instead of absolute values. Check = memory_gc_time_base("Copy") Check = memory_gc_time_base("MarkSweepCompact") Use = memory_pool_base("Code Cache") # ================================================ # Collection of related checks. # Overall view to the memory statistics Check memory_heap Check memory_non_heap