Перейти к основному содержимому

Generic Java JMX

Macros used

NameValue
{$JMX.CPU.LOAD.MAX}85
{$JMX.CPU.LOAD.TIME}5m
{$JMX.FILE.DESCRIPTORS.MAX}85
{$JMX.FILE.DESCRIPTORS.TIME}3m
{$JMX.HEAP.MEM.USAGE.MAX}85
{$JMX.HEAP.MEM.USAGE.TIME}10m
{$JMX.MEM.POOL.NAME.MATCHES}Old Gen|G1|Perm Gen|Code Cache|Tenured Gen
{$JMX.MP.USAGE.MAX}85
{$JMX.MP.USAGE.TIME}10m
{$JMX.NONHEAP.MEM.USAGE.MAX}85
{$JMX.NONHEAP.MEM.USAGE.TIME}10m
{$JMX.PASSWORD}

-

{$JMX.USER}

-

Items collected

NameDescriptionTypeIntervalKey and additional info
ClassLoading: Loaded class countDisplays number of classes that are currently loaded in the Java virtual machine.JMX

-

jmx["java.lang:type=ClassLoading","LoadedClassCount"]
ClassLoading: Total loaded class countDisplays the total number of classes that have been loaded since the Java virtual machine has started execution.JMX

-

jmx["java.lang:type=ClassLoading","TotalLoadedClassCount"]
ClassLoading: Unloaded class countDisplays the total number of classes that have been loaded since the Java virtual machine has started execution.JMX

-

jmx["java.lang:type=ClassLoading","UnloadedClassCount"]
Compilation: Name of the current JIT compilerDisplays the total number of classes unloaded since the Java virtual machine has started execution.JMX

-

jmx["java.lang:type=Compilation","Name"]
Compilation: Accumulated time spentDisplays the approximate accumulated elapsed time spent in compilation, in seconds.JMX

-

jmx["java.lang:type=Compilation","TotalCompilationTime"]
Memory: Heap memory committedCurrent heap memory allocated. This amount of memory is guaranteed for the Java virtual machine to use.JMX

-

jmx["java.lang:type=Memory","HeapMemoryUsage.committed"]
Memory: Heap memory maximum sizeMaximum amount of heap that can be used for memory management. This amount of memory is not guaranteed to be available if it is greater than the amount of committed memory. The Java virtual machine may fail to allocate memory even if the amount of used memory does not exceed this maximum size.JMX

-

jmx["java.lang:type=Memory","HeapMemoryUsage.max"]
Memory: Heap memory usedCurrent memory usage outside the heap.JMX

-

jmx["java.lang:type=Memory","HeapMemoryUsage.used"]
Memory: Non-Heap memory committedCurrent memory allocated outside the heap. This amount of memory is guaranteed for the Java virtual machine to use.JMX

-

jmx["java.lang:type=Memory","NonHeapMemoryUsage.committed"]
Memory: Non-Heap memory maximum sizeMaximum amount of non-heap memory that can be used for memory management. This amount of memory is not guaranteed to be available if it is greater than the amount of committed memory. The Java virtual machine may fail to allocate memory even if the amount of used memory does not exceed this maximum size.JMX

-

jmx["java.lang:type=Memory","NonHeapMemoryUsage.max"]
Memory: Non-Heap memory usedCurrent memory usage outside the heapJMX

-

jmx["java.lang:type=Memory","NonHeapMemoryUsage.used"]
Memory: Object pending finalization countThe approximate number of objects for which finalization is pending.JMX

-

jmx["java.lang:type=Memory","ObjectPendingFinalizationCount"]
OperatingSystem: File descriptors maximum countThis is the number of file descriptors we can have opened in the same process, as determined by the operating system. You can never have more file descriptors than this number.JMX

-

jmx["java.lang:type=OperatingSystem","MaxFileDescriptorCount"]
OperatingSystem: File descriptors openedThis is the number of opened file descriptors at the moment, if this reaches the MaxFileDescriptorCount, the application will throw an IOException: Too many open files. This could mean you are opening file descriptors and never closing them.JMX

-

jmx["java.lang:type=OperatingSystem","OpenFileDescriptorCount"]
OperatingSystem: Process CPU LoadProcessCpuLoad represents the CPU load in this process.JMX

-

jmx["java.lang:type=OperatingSystem","ProcessCpuLoad"]
Runtime: JVM uptime

-

JMX

-

jmx["java.lang:type=Runtime","Uptime"]
Runtime: JVM name

-

JMX1hjmx["java.lang:type=Runtime","VmName"]
Runtime: JVM version

-

JMX1hjmx["java.lang:type=Runtime","VmVersion"]
Threading: Daemon thread countNumber of daemon threads running.JMX

-

jmx["java.lang:type=Threading","DaemonThreadCount"]
Threading: Peak thread countMaximum number of threads being executed at the same time since the JVM was started or the peak was reset.JMX

-

jmx["java.lang:type=Threading","PeakThreadCount"]
Threading: Thread countThe number of threads running at the current moment.JMX

-

jmx["java.lang:type=Threading","ThreadCount"]
Threading: Total started thread countThe number of threads started since the JVM was launched.JMX

-

jmx["java.lang:type=Threading","TotalStartedThreadCount"]

Triggers

NameDescriptionExpressionPriorityDependencies
Compilation: {HOST.NAME} uses suboptimal JIT compiler

-

find(/Generic Java JMX/jmx["java.lang:type=Compilation","Name"],,"like","Client")=1INFO 🔔Compilation: Name of the current JIT compiler
OperatingSystem: Process CPU Load is high

-

min(/Generic Java JMX/jmx["java.lang:type=OperatingSystem","ProcessCpuLoad"],{$JMX.CPU.LOAD.TIME})>{$JMX.CPU.LOAD.MAX}AVERAGE ⚠OperatingSystem: Process CPU Load
Runtime: JVM is not reachable

-

nodata(/Generic Java JMX/jmx["java.lang:type=Runtime","Uptime"],5m)=1AVERAGE ⚠Runtime: JVM uptime
Runtime: {HOST.NAME} runs suboptimal VM type

-

find(/Generic Java JMX/jmx["java.lang:type=Runtime","VmName"],,"like","Server")<>1INFO 🔔Runtime: JVM name

Discovery rule №1

NameDescriptionTypeIntervalKey and additional info
Garbage collector discoveryGarbage collectors metrics discovery.JMX4hjmx.discovery["beans","java.lang:name=*,type=GarbageCollector"]

Item prototypes

NameDescriptionTypeIntervalKey and additional info
GarbageCollector: {#JMXNAME} number of collections per secondDisplays the total number of collections that have occurred per second.JMX

-

jmx["java.lang:name={#JMXNAME},type=GarbageCollector","CollectionCount"]
GarbageCollector: {#JMXNAME} accumulated time spent in collectionDisplays the approximate accumulated collection elapsed time, in seconds.JMX

-

jmx["java.lang:name={#JMXNAME},type=GarbageCollector","CollectionTime"]

Discovery rule №2

NameDescriptionTypeIntervalKey and additional info
Memory pool discoveryMemory pools metrics discovery.JMX4hjmx.discovery["beans","java.lang:name=*,type=MemoryPool"]

Item prototypes

NameDescriptionTypeIntervalKey and additional info
Memory pool: {#JMXNAME} committedCurrent memory allocated.JMX

-

jmx["java.lang:name={#JMXNAME},type=MemoryPool","Usage.committed"]
Memory pool: {#JMXNAME} maximum sizeMaximum amount of memory that can be used for memory management. This amount of memory is not guaranteed to be available if it is greater than the amount of committed memory. The Java virtual machine may fail to allocate memory even if the amount of used memory does not exceed this maximum size.JMX

-

jmx["java.lang:name={#JMXNAME},type=MemoryPool","Usage.max"]
Memory pool: {#JMXNAME} usedCurrent memory usage.JMX

-

jmx["java.lang:name={#JMXNAME},type=MemoryPool","Usage.used"]

Trigger prototypes

NameDescriptionExpressionPriorityDependencies
Memory pool: {#JMXNAME} memory usage is high

-

min(/Generic Java JMX/jmx["java.lang:name={#JMXNAME},type=MemoryPool","Usage.used"],{$JMX.MP.USAGE.TIME:"{#JMXNAME}"})>(last(/Generic Java JMX/jmx["java.lang:name={#JMXNAME},type=MemoryPool","Usage.max"])*{$JMX.MP.USAGE.MAX:"{#JMXNAME}"}/100) and last(/Generic Java JMX/jmx["java.lang:name={#JMXNAME},type=MemoryPool","Usage.max"])>0WARNING 📢