How to get the count of top messages reported by packages in Jira logs
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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
Summary
Sometimes the size of the Jira application log may increase considerably. This can make investigating issues challenging due to the sheer volume of entries to parse through.
The purpose of this Knowledge Base Article is to help parse through the logs and get the most common occurrences by package and logging level.
The commands below will list of the most reported message from packages by logging level: 'DEBUG', 'INFO', 'WARN', 'ERROR'
and 'FATAL'
:
Environment
Jira 8.0 and above
Solution
In the Jira node's OS level, navigate to the $JIRA_HOME/log directory and run the commands below.
Use the linux "egrep" command to list the number of the top 5 messages from packages by logging level.
The format of the command is below. Replace <logging level>
with either DEBUG INFO WARN ERROR or FATAL
. If you want to see more than 5 entries, update the tail -5
command at the end to a bigger number.
1
egrep '<logging level>' atlassian-jira.log | cut -d'[' -f2 | cut -d']' -f1 | sort | uniq -c | sort -k1 -n | tail -5
Examples:
This command will list the top 5 most occurring packages for the INFO logging level.
1
2
3
4
5
6
egrep 'INFO' atlassian-jira.log | cut -d'[' -f2 | cut -d']' -f1 | sort | uniq -c | sort -k1 -n | tail -5
1626 c.a.j.p.devstatus.provider.DefaultCoordinator
2070 com.valiantys.ScheduleAggregationListener
3142 c.a.j.index.ha.DefaultIndexRecoveryManager
4086 c.a.j.p.webhooks.matcher.JqlEventMatcher_SLOW
14280 c.a.j.c.distribution.localq.LocalQCacheManager
This command will list the top 5 most occurring packages for the WARN logging level.
1
2
3
4
5
6
egrep 'WARN' atlassian-jira.log.3-06102020 | cut -d'[' -f2 | cut -d']' -f1 | sort | uniq -c | sort -k1 -n | tail -5
176 c.a.streams.internal.StreamsCompletionService
179 c.atlassian.ozymandias.SafePluginPointAccess
406 c.a.jira.index.MonitoringIndexWriter
480 c.a.j.i.search.util.SearchSortUtilImpl
485 c.a.j.issue.managers.CachingCustomFieldManager
This command will list the top 5 most occurring packages for the DEBUG logging level.
1
2
3
4
5
6
egrep 'DEBUG' atlassian-jira.log.3-06102020 | cut -d'[' -f2 | cut -d']' -f1 | sort | uniq -c | sort -k1 -n | tail -5
4754 c.o.j.groovy.jql.ScriptedFunctionClauseFactory
4867 c.o.scriptrunner.runner.ScriptBindingsManager
14568 c.o.j.groovy.jql.NumericCompare
38478 c.n.p.u.data.service.SafeActiveObjects
50493 c.o.j.g.jql.entitymatch.AbstractEntityMatch
Was this helpful?