Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin does't expose metrics of jobs on /prometheus endpoint #721

Open
looks6 opened this issue Dec 23, 2024 · 4 comments
Open

Plugin does't expose metrics of jobs on /prometheus endpoint #721

looks6 opened this issue Dec 23, 2024 · 4 comments

Comments

@looks6
Copy link

looks6 commented Dec 23, 2024

I have issue with the plugin, I don't see metrics for a jobs for example default_jenkins_builds_duration_milliseconds_summary and so on.
I have tried everything enabled\disable authentication, and I thing that I used every possible combination of plugin configuration, but still witout desired result.
Could someone help with this issue or even direct to correct way to solve this issue?
I have poduction environment with a jenkins ver. 2.497, and prometheus metrics plugin ver. 801.
The same version have on staging env and there this works without problem
Thanks in advance

@Waschndolos
Copy link

Did you use a browser for checking? If not, in some scraping Tools you need to configure a trailing / at the end. If that does not help, please check the Jenkins Controller Logs for errors and provide your Plugin configuration so we can check

@looks6
Copy link
Author

looks6 commented Dec 24, 2024

I see metrics but not that which are related with job execution, so endpoint works correct.
But something impact to expose metrics from Job Collector.
I mean this metrics:
default_jenkins_builds_duration_milliseconds_summary
default_jenkins_builds_success_build_count
default_jenkins_builds_failed_build_count
default_jenkins_builds_unstable_build_count
default_jenkins_builds_total_build_count
default_jenkins_builds_aborted_build_count
default_jenkins_builds_health_score Health
default_jenkins_builds_available_builds_count
default_jenkins_builds_discard_active
default_jenkins_builds_running_build_duration_milliseconds

I have checked logs of Jenkins controller but there no related with this plugin.
Plugin config:
Path: prometheus
Default namespace: default
Enable authentication for prometheus end-point: checked
Count duration of successful builds: checked
Count duration of unstable builds: checked
Count duration of failed builds: checked
Count duration of not-built builds: checked
Count duration of aborted builds: checked
Fetch the test results of builds: checked
Job attribute name: jenkins_job
Collect disk usage: checked
Collect node status: checked

I don't know where to start troubleshooting. No logs.

@Waschndolos
Copy link

Have you compared the other plugins of your dev/staging instance to the production instance? When you say that the dev/staging is working with that prometheus version it must be a difference on the Jenkins setup between staging and prod. I guess both use Java 17 for the jenkins controller? You could enable debug logging for org.jenkinsci.plugins.prometheus.JobCollector to see if that is collecting anything

@Waschndolos
Copy link

any updates here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants