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.
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.