Identifying the number of JSM (legacy) automations running in Jira

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

When troubleshooting performance problems in Jira applications, it's recommended review how many JSM (Jira Service Management) automation rules are being executed in the cluster at any given time, as depending on the numbers can be very impactful to the application performance.

ℹ️ Please note that this article only applies to the automation module provided by Jira Service Management, which is also now referred to as the Legacy Automation. This article does not apply to automations that come from Automation For Jira.

Solution

If you are using Automation for Jira, you can get the numbers using the Performance Insights functionality provided in the app, however, there's no equivalent functionality for the Automation module from Jira Service Management. To obtain these numbers, you can use the following SQL queries:

These SQL queries have been written for PostgreSQL. Different databases such as MySQL, Oracle and MSSQL will require adjustments to these queries, which should be done by your DBA.

The queries are using an interval of rolling 30 days, but you can adjust the interval as desired.

Count of automation rules executed over the last 30 days

1 2 3 select count(*) from "AO_9B2E3B_RULE_EXECUTION" where "OUTCOME" = 'EXECUTED' and TO_TIMESTAMP("START_TIME_MILLIS" / 1000) >=  NOW() - INTERVAL '30 day';

The average number of automation rules executed over the last 30 days per minute

1 2 3 4 5 6 7 select avg(count) per_minute_avg from (                                  select count(*) count                                  from "AO_9B2E3B_RULE_EXECUTION"                                  where "OUTCOME" = 'EXECUTED'                                    and TO_TIMESTAMP("START_TIME_MILLIS" / 1000) >= NOW() - INTERVAL '30 day'                                  group by date_trunc('minute', TO_TIMESTAMP("START_TIME_MILLIS" / 1000))                              ) s;

The average number of automation rules executed over the last 30 days per hour

1 2 3 4 5 6 7 select avg(count) per_hour_avg from (                                    select count(*) count                                    from "AO_9B2E3B_RULE_EXECUTION"                                    where "OUTCOME" = 'EXECUTED'                                      and TO_TIMESTAMP("START_TIME_MILLIS" / 1000) >= NOW() - INTERVAL '30 day'                                    group by date_trunc('hour', TO_TIMESTAMP("START_TIME_MILLIS" / 1000))                                ) s;

The average number of automation rules executed over the last 30 days per day

1 2 3 4 5 6 7 select avg(count) per_day_avg from (                                    select count(*) count                                    from "AO_9B2E3B_RULE_EXECUTION"                                    where "OUTCOME" = 'EXECUTED'                                      and TO_TIMESTAMP("START_TIME_MILLIS" / 1000) >= NOW() - INTERVAL '30 day'                                    group by date_trunc('day', TO_TIMESTAMP("START_TIME_MILLIS" / 1000))                                ) s;
Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.