Monitor your instance with Jira diagnostics plugin

When investigating a performance problem or outage, it's useful to know as much as possible about what was happening in your site in the lead-up to the problem. This is when diagnostics information can help.  That is why we a produce daily summary on all alerts fired with Atlassian diagnostics framework.

While often not individually actionable, diagnostic alerts can help you build up a detailed picture of your application’s behaviour, and identify symptoms that may be contributing to the problem. 

The plugin is available in Jira version 7.13 and later.

About diagnostic alerts

The purpose of the diagnostics tool is to continuously check for symptoms or behaviours that we know may contribute to problems in your application. An alert is triggered when a set threshold is exceeded.

Property

Default value

Explanation

jira.diagnostics.thresholds.slow-query-millis

400 ms

Alert for slow JQL query

jira.diagnostics.thresholds.number-of-results

1000

Number of returned issues from a single JQL query

jira.diagnostics.thresholds.query-complexity

1000

Lucene query complexity - number of clauses the query is constructed of

For example, if a query takes more than 0.4 s falls an alert is triggered. This is useful because if users run a lot of queries at the same time, it might overload the system.

It's important to note that the thresholds are just the point at which the alert is triggered. It's not the same as a timeout, or other hard limit. For example a long running task may trigger an alert after 5 minutes, and still complete successfully after 8 minutes. 

When an alert is triggered a message is written to the atlassian-jira.log file (your application log), and further details provided in the jira-diagnostics.log file.  It's also included in support zips.

Sample alerts

Log entryExplanation
2020-06-04 03:27:15,009+0000 pool-23-thread-1 INFO ServiceRunner [atlassian-
diagnostics-data-logger] 1591241235004 ; INFO ; DB ; DB-3002 ; High database con
nection pool utilization detected. ; <app-key> ; ; ; {"activeConnections":2
1,"idleConnections":4,"maxConnections":25}

The database connection pool was been highly utilized in the last sampling period.

INFO ServiceRunner [atlassian-
diagnostics-data-logger] 1591241235004 ; INFO ; DB ; DB-3002 ; Slow scheduled job ;
A scheduled job took longer than its configured interval to complete.
INFO ServiceRunner [atlassian-
diagnostics-data-logger] 1591241235004 ; INFO ; DB ; DB-2001 ; Slow event listener detected  ;
An event was successfully dispatched to an event listener, but the event or listener took a long time to process it. For synchronous events, the user request that triggered the event had to wait a long time for the request to complete. For asynchronous events, one of the event processing threads was unavailable to dispatch other events during this time.
INFO ServiceRunner [atlassian-
diagnostics-data-logger] 1591241235004 ; INFO ; DB ; DB-3001 ; Slow HTTP request detected ;
An HTTP request took longer than 60 seconds to complete.

3-rd party apps can also generate custom alerts that are visible in the logs.


Retention and defaults

Some behaviours trigger a single alert, for others, multiple alerts are possible. Diagnostic information is stored in the database, and retained for 30 days. Old alerts are cleaned up automatically.

Change the property default values

Upping the values will result in fewer alerts to be triggered.

  • The values can be modified either from the $JIRA_HOME/jira-config.properties. For example,

    jira.diagnostics.thresholds.slow-query-millis=5000 
    jira.diagnostics.thresholds.number-of-results=10000 
    
  • They can also be modified using the following JVM parameters:

    -Djira.diagnostics.thresholds.slow-query-millis=5000 
    -Djira.diagnostics.thresholds.number-of-results=10000  
    

Make sure there are no spaces between the equal sign in both methods.

Change the default retention

To change the default retention of 30 days, do the following:

  1. Open jira-config.properties.

  2. Edit the following metric changing the number of retention days:com.atlassian.jira.health.diagnostics.alerts.retention-period-days: <number of days to retain Diagnostics Alerts>

Last modified on Jun 23, 2020

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.