Last active
October 1, 2021 11:14
-
-
Save simonpasquier/7f00cc57f7b1cf06ec338ce56775e5db to your computer and use it in GitHub Desktop.
Sample prometheus configuration for Jenkins
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| global: | |
| scrape_interval: 10s | |
| evaluation_interval: 30s | |
| scrape_configs: | |
| - job_name: 'jenkins' | |
| metrics_path: '/prometheus/' | |
| scheme: https | |
| tls_config: | |
| insecure_skip_verify: true | |
| bearer_token: <INSERT TOKEN HERE> | |
| static_configs: | |
| - targets: ['jenkins-myproject.192.168.1.17.nip.io:443'] | |
| # The Prometheus metrics plugin exposes metrics with the "job" label which are transformed into "exported_job". | |
| # Turn them into "jenkins_job" instead. | |
| metric_relabel_configs: | |
| - action: replace | |
| source_labels: [exported_job] | |
| target_label: jenkins_job | |
| - action: labeldrop | |
| regex: exported_job |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@fourirakbar