JMX metrics for JIRA caches
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
This article describes how to expose JMX MBeans for JIRA caches.
What is JMX?
JMX (Java Management Extensions) is a technology for monitoring and managing Java applications. JMX uses objects called MBeans (Managed Beans) to expose data and resources from your application. For large instances of JIRA Server or JIRA Data Center, enabling JMX allows you to more easily monitor the consumption of application resources. This enables you to make better decisions about how to maintain and optimize machine resources.
Supported platforms
Currently this feature is present in both: JIRA Server and JIRA Data Center starting from 7.9 (ER - 7.6.5)
JIRA Server
Enabling storing caches metrics in JIRA
This mechanism is turned off by default. To start collecting metrics on you will need to provide the following arguments when starting JIRA:
-Datlassian.cache.statistics.enabled=true -Datlassian.cache.jmx=true
Note: this feature cannot be enabled with
> System > JMX monitoring.Cache metrics collected by JIRA
The following table lists metrics collected for JIRA Server (for more details you may refer to Guava Cache documentation).
All of them are grouped in com.google.common.cache->CacheStatistics→JIRA Cache Manager.
Metric | Description |
---|---|
AverageLoadPenalty | Returns the average time spent loading new values. |
EvictionCount | Returns the number of times an entry has been evicted. |
HitCount | Returns the number of times cache lookup methods have returned a cached value |
HitRate | Returns the ratio of cache requests which were hits. |
LoadCount | Returns the total number of times that cache lookup methods attempted to load new values. |
LoadExceptionCount | Returns the number of times cache lookup methods threw an exception while loading a new value. |
LoadExceptionRate | Returns the ratio of cache loading attempts which threw exceptions. |
LoadSuccessCount | Returns the number of times cache lookup methods have successfully loaded a new value. |
MissCount | Returns the number of times cache lookup methods have returned an uncached (newly loaded) value, or null. |
MissRate | Returns the ratio of cache requests which were misses. |
RequestCount | Returns the number of times cache lookup methods have returned either a cached or uncached value. |
Size | Returns the number of entries in this cache. |
TotalLoadTime | Returns the total number of nanoseconds the cache has spent loading new values. |
Jira Data Center
Enabling storing caches metrics in JIRA
This mechanism is turned off by default. To start collecting metrics on you will need to provide the following arguments when starting JIRA:
-Datlassian.cache.jmx=true
Note: this feature cannot be enabled with
> System > JMX monitoring.Cache metrics collected by JIRA
The following table lists metrics collected for JIRA Server (for more details you may refer to Ehcache documentation).
All of them are grouped in net.sf.ehcache->CacheStatistics→JIRA Cache Manager.
Metric | Description |
---|---|
Metric | Description |
CacheHitPercentage | Returns the percentage of cache accesses that found a requested item in the cache. |
CacheHits | Returns the number of times a requested item was found in the cache. |
CacheMissPercentage | Returns the percentage of cache accesses that did not find a requested element in the cache. |
CacheMisses | Returns the number of times a requested item was not found in the cache. |
DiskStoreObjectCount | Returns the number of objects in the disk store. |
InMemoryHitPercentage | Returns the percentage of cache accesses that found a requested item cached in-memory. |
InMemoryHits | Returns the number of times a requested item was found in the memory store. |
InMemoryMisses | Returns the number of times a requested item was not found in the memory store. |
MemoryStoreObjectCount | Returns the number of objects in the memory store. |
ObjectCount | Returns the number of elements stored in the cache. |
OffHeapHitPercentage | Returns the percentage of cache accesses that found a requested item cached off-heap. |
OffHeapHits | Returns the number of times a requested item was found in the off-heap store. |
OffHeapMisses | Returns the total number of times a requested item was not found in the off-heap store. |
OffHeapStoreObjectCount | Returns the number of objects in the off-heap store. |
OnDiskHitPercentage | Returns the percentage of cache accesses that found a requested item cached on disk. |
OnDiskHits | Returns the number of times a requested item was found in the disk store. |
OnDiskMisses | Returns the number of times a requested item was not found in the disk store. |
WriterMaxQueueSize | Returns the maximum size of the write-behind queue, if any. |
WriterQueueLength | Returns the size of the write-behind queue, if any. |
Additional details
For additional information about JMX functionality and configuration of Jira monitoring using the JMX interface, please refer to the "Live monitoring using the JMX interface" user guide.