This is Bitbucket plugin which provides endpoint to expose Bitbucket metrics to Prometheus.
For more information the documentation Prometheus Exporter For Bitbucket.
On Atlassian Marketplace Prometheus Exporter For Bitbucket
Prometheus Exporter for Bitbucket
License: BSD 2-Clause "Simplified" License
This is Bitbucket plugin which provides endpoint to expose Bitbucket metrics to Prometheus.
For more information the documentation Prometheus Exporter For Bitbucket.
On Atlassian Marketplace Prometheus Exporter For Bitbucket
When ever i edit the prometheus.yml and putting the settings required for the prometheus to hit the endpoint to collect the metrics. This is the error i see in my bitbucket access log
"GET /mvc/error404 HTTP/1.1" | "" "Prometheus/2.3.2" | 404 | 0 | 9112 | - | 86 | - |
"GET /XXXXXXXX/plugins/servlet/prometheus/metrics HTTP/1.1" | "" "Prometheus/2.3.2" | 404 | 0 | 0 | - | 23 | - |
It would be great if we can have count of code commit/push failures repo wise.
Hi,
I've just installed the exporter.
Calling the metrics endpoint from browser is working as long as I'm logged in to bitbucket.
If I try the same while I'm logged out only jvm and process metrics are exported.
I've tried as well with token.
Prometheus is not authenticated so some important metrics are missing.
Bitbucket version: 5.6.2
It would be nice to have the individual pushes to the repo and the timestamp of the push. This allows for annotations in Grafana based on this push information.
Now we only have a count of all the pushes per person, per repo
What do you think about adding more metrics from JMX: https://confluence.atlassian.com/bitbucketserver056/enabling-jmx-counters-for-performance-monitoring-943529423.html
They could be fetched via: https://github.com/prometheus/jmx_exporter - or purely programmatic by getting the jmx beans and exposing the values via prometheus.
Could you please add license metrics such as:
Metrics might be provided by
https://docs.atlassian.com/bitbucket-server/rest/5.6.2/bitbucket-rest.html#idm46036345741712
Hi, is there a suggested Delay value configuration? By default it is set to 1 minute. I would like to extend it to a higher value. Prometheus is getting metrics every 5 seconds.
Thanks in advance.
Hi,
thanks for this great plugin, ...but it stopped working with 6.6.1
error:
2019-09-05 07:22:17,322 ERROR [spring-startup] c.a.plugin.osgi.factory.OsgiPlugin Detected an error (BundleException) enabling the plugin 'ru.andreymarkelov.atlas.plugins.prom-bitbucket-exporter' : Unable to resolve ru.andreymarkelov.atlas.plugins.prom-bitbucket-exporter [126](R 126.0): missing requirement [ru.andreymarkelov.atlas.plugins.prom-bitbucket-exporter [126](R 126.0)] osgi.wiring.package; (&(osgi.wiring.package=com.atlassian.bitbucket.dmz.permission)(version>=6.6.1)(version<=6.6.1)) Unresolved requirements: [[ru.andreymarkelov.atlas.plugins.prom-bitbucket-exporter [126](R 126.0)] osgi.wiring.package; (&(osgi.wiring.package=com.atlassian.bitbucket.dmz.permission)(version>=6.6.1)(version<=6.6.1))]. This error usually occurs when your plugin imports a package from another bundle with a specific version constraint and either the bundle providing that package doesn't meet those version constraints, or there is no bundle available that provides the specified package. For more details on how to fix this, see https://developer.atlassian.com/x/mQAN
2019-09-05 07:22:17,322 WARN [spring-startup] c.a.plugin.impl.AbstractPlugin Unable to enable plugin 'ru.andreymarkelov.atlas.plugins.prom-bitbucket-exporter'
Thomas
Hi @AndreyVMarkelov ,
thanks for your great work on this Prometheus Bitbucket exporter. Could you please also add this metric here?
bitbucket_allowed_users_gauge
This metric is pretty important for us to send alarms if we only have a few bitbucket licences left. Here's an example alert rule for Prometheus which would notify us in case of 80% of the licences used:
bitbucket_active_users_gauge / bitbucket_allowed_users_gauge * 100 > 80
You already have comparable metrics for your JIRA and Confluence exporters.
Thank you very much.
Best regards
Chris
Would be great to have the option to use an authenticated user instead of a token.
Can we have the metrics showing the biggest commiter to the repo and the project.
hello
i would like this exporter to support version 4.6.1
is that possible ?
i already tried to install the add-on and when i tried to reach the endpoint /plugins/servlet/prometheus/metrics and i got 404 message: Could not find servlet for /plugins/servlet/prometheus/metrics
Thanks
Hi,
First of all, thanks for the plugin development, it has helped a lot.
I am facing a strange issue. On my Prometheus endpoint I am having a wrong metric for active users guage, here is a screenshot.
bitbucket_active_users_gauge -1.0
for test purpose I have only 2 users right now and both are logged in.
Bitbucket version 5.14.1 and latest jar plugin for Bitbucket from Atlassian marketplace.
I would like to expose those metrics:
Thanks !!
Hello,
How do you actually monitor with the exporter in a bitbucket datacenter? Especially if it's configured in round robin. You can't monitor the nodes individually.
Is there a solution or the ideal solution would be to configure it per node and export JVM.
Is there a way to track the repositories that move from one project to other. In our organization people move from one project to other and they move their repositories from one project to other. Any help on this would be appreciated. Thanks !!
Hi, the grafana dashboard json is very nice for the users, but can you help fix the typos in there?
Aloowed => allowed
pished => pushed
Also, it looks like current user/allow users are hooked up incorrectly.
Thanks very much!
First of all, thanks for crating this plugin!
Is it possible to get a project label in the repository push metrics?
bitbucket_repo_push_count{project="project1",repository="repo1",username="user1",} 5.0
bitbucket_repo_push_count{project="project1",repository="repo2",username="user1",} 2.0
bitbucket_repo_push_count{project="project2",repository="repo1",username="user2",} 2.0
bitbucket_repo_push_count{project="project3",repository="repo1",username="user1",} 2.0
We've been using prom-bitbucket-exporter to monitor test instances while going through Bitbucket data center validation for our app.. We then noticed fairly high CPU usage while the servers were completely idle.
For "large" user directories, it turns out ScheduledMetricEvaluatorImpl.calculateUsersCount is a fairly expensive operation. In our case, there's two directories (one LDAP one Crowd) with approx 10k users each. CPU usage sits at a more or less constant 25% on each of the four Bitbucket Datacenter nodes, even, when the servers are otherwise completely idle.
For now, I've simply disabled the entire executor (as we don't really need these particular metrics) which seems to have solved problem. But a proper fix would perhaps be if collection of additional metrics such as this (particularly metrics that can be costly) was configurable through the add-on.
Attached zip with jstack dump of the offending thread, and a flame graph illustrating the problem. FG was generated on a completely idle instance (no incoming user requests). It has some missing symbols due to insufficient warmup, and also some churn, but it was none the less enough to find the exact offending thread with jstack.
few metrics I am thinking of as part of this exporter as
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.