Giter Site home page Giter Site logo

andreyvmarkelov / prom-bitbucket-exporter Goto Github PK

View Code? Open in Web Editor NEW
51.0 5.0 21.0 647 KB

Prometheus Exporter for Bitbucket

Home Page: https://marketplace.atlassian.com/plugins/ru.andreymarkelov.atlas.plugins.prom-bitbucket-exporter/server/overview

License: BSD 2-Clause "Simplified" License

Java 89.60% HTML 9.28% Shell 1.12%
prometheus-exporter bitbucket grafana prometheus-metrics bitbucket-plugin bitbucket-monitoring

prom-bitbucket-exporter's Introduction

prom-bitbucket-exporter's People

Contributors

andreyvmarkelov avatar mr-exz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

prom-bitbucket-exporter's Issues

Not able to view metrics in prometheus

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 | - |

missing bitbucket metrics

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

push timestamps

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

Question - Delay Value Configuration

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.

1.0.11 does not work with 6.6.1

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

Add metric for maximum allowed users

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

Support for user auth

Would be great to have the option to use an authenticated user instead of a token.

version 4.6.1 support

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

Active Users Gauge shows Negative Value

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.

image

HELP bitbucket_active_users_gauge Active Users Gauge

TYPE bitbucket_active_users_gauge gauge

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.

New Metrics

I would like to expose those metrics:

  1. pull requests created time per repository and the labels of it can be: pull request name, commit id, author, message, repository, user, state (confirmed or not etc ..), beach from, beach to; The value should be the the time passed since the pull request created.
  2. Last branch commit time and labels can be: beach, repository, author..
  3. Number of commits per repository.
  4. Total Size of repository
  5. Number of clones per repository (ever)
  6. Last pushed to master per repository , labels: commit, author, repository,

Thanks !!

Exporter in bitbucket data center

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.

Track Move requests

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 !!

Grafana dashboard typos

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!

Feature request: include project name in repository push metrics

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

calculateUsersCount: high CPU usage on large instance

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.

stack.zip

Track new metrics using backbox exporter

few metrics I am thinking of as part of this exporter as

  1. Overall time taken by commit from commit to first successful build.
  2. avg. time taken by each commit to build on CI server.
  3. waiting/queuing time of each commit on the CI system.
  4. How many times a commit failed before a successful merge into main/master?
  5. How many times does the master branch run in a day on CI server?
  6. Total number of build in days from master as well as PR branch of each commit.
  7. Total successful or failed build for single commit until successful deployment.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.