How to monitor database connections 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 は除く

    

要約

This article provides some examples on how we can monitor Database connection usage in Jira.


環境

Jira 8


ソリューション

Database monitoring graph

Jira has a built-in database connection pool graph in which we can see the available connections in the pool and the active ones:

https://confluence.atlassian.com/adminjiraserver/monitoring-database-connection-usage-938847726.html

Performance log file

The atlassian-jira-perf.log is one of the useful logs we may parse to get Database Connection usage info over time.

The lines we're interested are the PLATFORMINSTRUMENTS records that contain values for "dbcp.numActive", meaning the number of active DB connections at that time.

Grepping the log as follows will produce an output similar to the one below, with the timestamp and the number of active connections at (roughly) every minute:

$ cat atlassian-jira-perf.log | egrep 'dbcp.numActive","value":"[0-9]*"' | sed -E 's/,[0-9]{3}.*dbcp.numActive",/ /g' | sed -E 's/\},\{.*$//g' | sed 's/"value"://g' | sed 's/"//g' | cut -d" " -f-3
出力
2020-12-03 13:59:23 49
2020-12-03 14:00:16 50
2020-12-03 14:01:09 47
2020-12-03 14:02:00 46
2020-12-03 14:02:50 50
2020-12-03 14:03:51 46
2020-12-03 14:07:54 1
2020-12-03 14:08:54 1
2020-12-03 14:09:54 1

You may compare those values with the dbconfig.xml <pool-size> parameter to confirm the DB pool hasn't been a performance bottleneck.

Also check Tuning database connections!


最終更新日: 2020 年 12 月 9 日

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

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