Skip to content

Bitbucket

Auto-Discovery
Health Check
Metrics
Logs

To enable metrics gathering, Bleemeo agent needs to be installed with JMX enabled, see Java Metrics for setup details.

In addition Bitbucket need to expose JMX over a TCP port. To enable JMX you can follow Enabling JMX counters for performance monitoring on Atlassian documentation.

Here is a summary for unauthenticated access:

  • Add option -Dcom.sun.management.jmxremote.port=3333 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false to the JVM. Default Bitbucket startup-script accept them from JMX_OPTS or JAVA_OPTS environment variable.
  • Add jmx.enable=true to $BITBUCKET_HOME/shared/bitbucket.properties

Warning: this will allow unauthenticated access. Make sure no untrusted access to this port is possible or you should setup authenticated JMX access.

Bleemeo agent should auto-detect the JMX port, if some auto-detected parameters are wrong, you can manually override them by adding the following to /etc/glouton/conf.d/99-local.conf:

service:
[...]
# For a Bitbucket running outside a container
- type: "bitbucket"
address: "127.0.0.1"
port: 7990
jmx_port: 3333
jmx_username: "monitorRole" # by default, no authentication is done
jmx_password: "secret"
# For an additional Bitbucket running outside a container
- type: "bitbucket"
instance: "NAME_ASSOCIATED_WITH_YOUR_ADDITIONAL_SERVICE"
address: "127.0.0.1"
port: 7991
jmx_port: 3334
jmx_username: "monitorRole" # by default, no authentication is done
jmx_password: "secret"
# For a Bitbucket running in a Docker container
- type: "bitbucket"
instance: "CONTAINER_NAME"
address: "172.17.0.2"
port: 7990
jmx_port: 3333
jmx_username: "monitorRole" # by default, no authentication is done
jmx_password: "secret"

Agent gathers the following metrics:

MetricDescription
service_statusStatus of Bitbucket
bitbucket_eventsNumber of events per second
bitbucket_io_tasksNumber of events per second
bitbucket_jvm_gcNumber of garbage collection per second
bitbucket_jvm_gc_utilizationGarbage collection utilization in percent
bitbucket_jvm_heap_usedHeap memory used in bytes
bitbucket_jvm_non_heap_usedNon-Heap memory used in bytes
bitbucket_pullsNumber of pulls per second
bitbucket_pushesNumber of pushes per second
bitbucket_queued_eventsNumber of events queued
bitbucket_queued_scm_clientsNumber of SCM clients queued
bitbucket_queued_scm_commandsNumber of SCM commands queued
bitbucket_request_timeAverage time of request in seconds
bitbucket_requestsNumber of requests per second
bitbucket_ssh_connectionsNumber of SSH connections per second
bitbucket_tasksNumber of scheduled tasks per second