Identifying the number of Automations running in Jira

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問


プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および Crucible は除く

要約


When troubleshooting performance problems in Jira applications, it's recommended review how many 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.

ソリューション

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 native Automation Rules 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;

Additionally, if you want to take a look at the same numbers but for Automation for Jira, from the database instead of using the UI, you can use the query below.

The average number of automation rules executed over the last 30 days in Automation for Jira

select 
        AI."OBJECT_ITEM_NAME" as Rule_Name
        ,sum(CASE WHEN AI."CATEGORY" = 'SUCCESS' THEN 1 ELSE 0 END) AS Successful_Executions
        ,sum(CASE WHEN AI."CATEGORY" = 'NO_ACTIONS_PERFORMED' THEN 1 ELSE 0 END) AS No_Actions_Performed
        from "AO_589059_AUDIT_ITEM" AI
        join "AO_589059_AUDIT_ITEM_ASC_ITEM" AIAI on AI."ID" = AIAI."AUDIT_ITEM_ID" 
        where 1=1 
        AND AI."CATEGORY" != 'CONFIG_CHANGE'
        AND AI."CREATED" >= NOW() - INTERVAL '30 day'
        group by AI."OBJECT_ITEM_NAME"

最終更新日 2022 年 11 月 18 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.