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

Still need help?

The Atlassian Community is here for you.

Ask the community


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

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.

(info) 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


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


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


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


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;



Last modified on Nov 26, 2024

Was this helpful?

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