jenkins_builds_duration_milliseconds_summary wont get displayed in prometheus
See original GitHub issueadd following environment vars:
PROMETHEUS_NAMESPACE=testing
PROMETHEUS_ENDPOINT=metrics
when i check my metrics
http://localhost:8080/metrics/
# HELP testing_jenkins_builds_duration_milliseconds_summary Summary of Jenkins build times in milliseconds by Job
# TYPE testing_jenkins_builds_duration_milliseconds_summary summary
testing_jenkins_builds_duration_milliseconds_summary_count{job="TEST1",} 1.0
testing_jenkins_builds_duration_milliseconds_summary_sum{job="TEST1",} 1.0
testing_jenkins_builds_duration_milliseconds_summary_count{job="TEST2",} 31.0
testing_jenkins_builds_duration_milliseconds_summary_sum{job="TEST2",} 31.0
But i cant see these entries in prometheus… All the other metrics are working fine and get displayed.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:12 (1 by maintainers)
Top Results From Across the Web
Metrics - Jenkins Plugins
duration gives an approximate measure of the number of executors required in order to ensure that every build request results in a build....
Read more >Jenkins Integration | Tanzu Observability Documentation
This integration uses the Prometheus plugin to get the data from Jenkins. ... jenkins.default.jenkins.builds.duration.milliseconds.summary.
Read more >Jenkins agent monitoring with Prometheus | by Rudolf Horváth
Following this guide you can create a Jenkins job, to forward basic monitoring metrics about the connected Jenkins agents to a Prometheus ......
Read more >The 4 Types Of Prometheus Metrics - Tom Gregory
summaries are a good option if you need to calculate accurate quantiles, but can't be sure what the range of the values will...
Read more >Jenkins Prometheus Plugin - Google Groups
I'm trying to monitor the build time + successful vs failed build rate with prometheus. ... Summary of Jenkins build times in milliseconds...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I experienced the same problem. My solution was to set ACL in Jenkins to allow anonymous user to read jobs as that is the user prometheus scrape client is using.
Now that I got it working, let me share what I did and also describe the situation we have…
We are using the Multi-branch plugin and have a private organisation on Github. So our repos are private. We can use our (personal) Github account to log into Jenkins. The prometheus plugin was not able to show the build metrics for those repos. Since we have also have a ‘generic’ user that is allowed to access Github and clone repos in order to be able to build them, I used the same user to create a token which I then use to do the authentication for the plugin for.
In the prometheus.yml (where we do the scraping of the metrics) I added a basic_authentication part where the username is the username of the ‘generic’ user. The password is the token that was generated on Github.
After this, it worked for me!