Generic Java JMX
Macros used
| Name | Value |
|---|---|
| {$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
| Name | Description | Type | Interval | Key and additional info |
|---|---|---|---|---|
| ClassLoading: Loaded class count | Displays number of classes that are currently loaded in the Java virtual machine. | JMX | - | jmx["java.lang:type=ClassLoading","LoadedClassCount"] |
| ClassLoading: Total loaded class count | Displays 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 count | Displays 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 compiler | Displays the total number of classes unloaded since the Java virtual machine has started execution. | JMX | - | jmx["java.lang:type=Compilation","Name"] |
| Compilation: Accumulated time spent | Displays the approximate accumulated elapsed time spent in compilation, in seconds. | JMX | - | jmx["java.lang:type=Compilation","TotalCompilationTime"] |
| Memory: Heap memory committed | Current 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 size | Maximum 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 used | Current memory usage outside the heap. | JMX | - | jmx["java.lang:type=Memory","HeapMemoryUsage.used"] |
| Memory: Non-Heap memory committed | Current 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 size | Maximum 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 used | Current memory usage outside the heap | JMX | - | jmx["java.lang:type=Memory","NonHeapMemoryUsage.used"] |
| Memory: Object pending finalization count | The approximate number of objects for which finalization is pending. | JMX | - | jmx["java.lang:type=Memory","ObjectPendingFinalizationCount"] |
| OperatingSystem: File descriptors maximum count | This 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 opened | This 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 Load | ProcessCpuLoad 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 | - | JMX | 1h | jmx["java.lang:type=Runtime","VmName"] |
| Runtime: JVM version | - | JMX | 1h | jmx["java.lang:type=Runtime","VmVersion"] |
| Threading: Daemon thread count | Number of daemon threads running. | JMX | - | jmx["java.lang:type=Threading","DaemonThreadCount"] |
| Threading: Peak thread count | Maximum 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 count | The number of threads running at the current moment. | JMX | - | jmx["java.lang:type=Threading","ThreadCount"] |
| Threading: Total started thread count | The number of threads started since the JVM was launched. | JMX | - | jmx["java.lang:type=Threading","TotalStartedThreadCount"] |
Triggers
| Name | Description | Expression | Priority | Dependencies |
|---|---|---|---|---|
| Compilation: {HOST.NAME} uses suboptimal JIT compiler | - | find(/Generic Java JMX/jmx["java.lang:type=Compilation","Name"],,"like","Client")=1 | INFO 🔔 | 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)=1 | AVERAGE ⚠ | Runtime: JVM uptime |
| Runtime: {HOST.NAME} runs suboptimal VM type | - | find(/Generic Java JMX/jmx["java.lang:type=Runtime","VmName"],,"like","Server")<>1 | INFO 🔔 | Runtime: JVM name |
Discovery rule №1
| Name | Description | Type | Interval | Key and additional info |
|---|---|---|---|---|
| Garbage collector discovery | Garbage collectors metrics discovery. | JMX | 4h | jmx.discovery["beans","java.lang:name=*,type=GarbageCollector"] |
Item prototypes
| Name | Description | Type | Interval | Key and additional info |
|---|---|---|---|---|
| GarbageCollector: {#JMXNAME} number of collections per second | Displays 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 collection | Displays the approximate accumulated collection elapsed time, in seconds. | JMX | - | jmx["java.lang:name={#JMXNAME},type=GarbageCollector","CollectionTime"] |
Discovery rule №2
| Name | Description | Type | Interval | Key and additional info |
|---|---|---|---|---|
| Memory pool discovery | Memory pools metrics discovery. | JMX | 4h | jmx.discovery["beans","java.lang:name=*,type=MemoryPool"] |
Item prototypes
| Name | Description | Type | Interval | Key and additional info |
|---|---|---|---|---|
| Memory pool: {#JMXNAME} committed | Current memory allocated. | JMX | - | jmx["java.lang:name={#JMXNAME},type=MemoryPool","Usage.committed"] |
| Memory pool: {#JMXNAME} maximum size | Maximum 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} used | Current memory usage. | JMX | - | jmx["java.lang:name={#JMXNAME},type=MemoryPool","Usage.used"] |
Trigger prototypes
| Name | Description | Expression | Priority | Dependencies |
|---|---|---|---|---|
| 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"])>0 | WARNING 📢 |