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

How to determine Bitbucket add-on usage

glennrees November 7, 2017

Hello, I have a few paid and free add-ons running in my Bitbucket 5.x instance, and I was wondering if there is an easy way to tell how much use they are getting, for future purchasing decisions etc.

2 answers

4 votes
Vladimir Filipchanka November 10, 2017

I found the solution. It's related more to hooks rather than addons. In my case it works because each addon has a hook. So first need to connect to Bitbucket's db. Then run next query

SELECT name AS repo_name, 
hook_key,
lob_data AS settings
FROM bitbucket.sta_repo_hook  
INNER JOIN bitbucket.repository ON sta_repo_hook.repository_id = repository.id  
INNER JOIN bitbucket.sta_shared_lob ON sta_repo_hook.lob_id = sta_shared_lob.id
WHERE hook_key LIKE '%hook_key_form_atlassian_plugin_xml%' 
AND is_enabled = '1';

It returns all enabled plugins with json settings for each of them. 

sta_repo_hook - table with many-to-many relationship between repos and hooks 

repository - table with repos

sta_shared_lob - settings for plugins

0 votes
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 8, 2017

It is not an easy thing because the plugin usage is not monitored or logged.

Probably you can enable the access logs and hope that every single call is recorded in there. But it depends on the implementation of the plugin. For example, there might be hooks, pull requests restrictions etc that are not logged even in the access logs.

Vladimir Filipchanka November 9, 2017

I have the same question. Our use case is that we have a really big amount of repos. And a few amount of 'probably' not used plugins. And need to determine whether plugins are used or not. It it possible to check? 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events