Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How can I count Bitbucket Server clones?

devpartisan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 12, 2018

Is there a way to count the clones that occur from a public-facing Bitbucket Server installation? I would like to count the number of clones created as a measure of open-source success.

 

1 answer

1 accepted

0 votes
Answer accepted
devpartisan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 12, 2018

Yes. Via Bitbucket's Audit Log.

Although I couldn't find it docs, I confirm that every clone triggers a RepositoryCloneEvent, with metadata including the repository name. Hence, you can quickly count clones using the following:

awk '{if ($3=="RepositoryCloneEvent") print $9}' atlassian-bitbucket-audit.log | uniq -c

By default, the bitbucket.properties is set to log HIGH events. Since RepositoryCloneEvent is a LOW event we need to set:

audit.highest.priority.to.log=LOW

For more information, see the Audit section of Bitbucket Server Config Properties.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events