How to get Count of Unique Users Accessing 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 は除く

ソリューション

アクセス ログ

By default Jira will ship with Tomcat's access log valve enabled.  This is set within server.xml:

<Valve className="org.apache.catalina.valves.AccessLogValve" pattern="%a %{jira.request.id}r %{jira.request.username}r %t &quot;%m %U%q %H&quot; %s %b %D &quot;%{Referer}i&quot; &quot;%{User-Agent}i&quot; &quot;%{jira.request.assession.id}r&quot;"/>


Here is an example of an user access Jira's dashboard:

0:0:0:0:0:0:0:1 673x575x1 admin [15/Mar/2019:11:13:32 -0700] "GET /secure/RapidBoard.jspa?rapidView=3&useStoredSettings=true HTTP/1.1" 200 12078 121 "http://localhost:8080/secure/Dashboard.jspa" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36" "hehlph"
  • Here we can see that the "admin" user had accessed an Agile board in Jira on 15/Mar/2019
  • There's a lot more information to grab here, but we'll only focus on the users here.
Unique users per day

With the details above from the access logs, here is an example of how it can be parsed to determine how many unique users are accessing Jira per day:

$ awk '{print $3}' access_log.2019-03-14 | sort | uniq
-
admin
testuser
dchan
joeblack
scrooge
  • Note that the "-" is an anonymous user.  This could be an user access Jira for the first time and has not yet logged in.  Or even Jira making a call to itself for some additional resources for a previous page load request.
  • If you want to extend the time range, simply include log files for each extra day.

Note that in a Jira Data Center environment, each node will have it's own set access logs. So we would need to check each node to get accurate data on unique user access.



説明
製品
最終更新日 2020 年 11 月 23 日

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

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