Prometheus Exporter for Bitbucket exposes Bitbucket metrics: JVM and application statistics to Prometheus.
...
- Use the following link to expose necessary metrics: /plugins/servlet/prometheus/metrics.
Set up the Prometheus settings
Code Block scrape_configs: - job_name: 'bitbucket' scheme: https #change to http if don't you have https metrics_path: '/<your_bitbucket_context_path>/plugins/servlet/prometheus/metrics' static_configs: - targets: ['myhost:1990']
Optionally, to enable secure access you access, you can configure a secret token. To configure the secret token:
- Log into your Bitbucket as Admin.
- In the cog wheel menu, select Administration.
- Locate and click Prometheus Exporter Settings. The Prometheus Exporter Settings page opens.
- Fill in the fields on this page. Use the following scrape URL: /plugins/servlet/prometheus/metrics?token=secrettoken.
The prometheus settings will now take the following look:
Code Block title prometheus.yml - job_name: 'bitbucket' scheme: https #change to http if don't you have https metrics_path: '/<your_bitbucket_context_path>/plugins/servlet/prometheus/metrics' params: token: ['1234567890'] # i'd reccomend use 128 symbol lenght long [A-Za-z0-9] static_configs: - targets: ['myhost:1990']
...