jenkinsci / prometheus-plugin

Jenkins Prometheus Plugin
https://plugins.jenkins.io/prometheus/
Apache License 2.0
184 stars 151 forks source link

2.0.11: missing default_jenkins_builds_last_stage_duration_milliseconds_summary_count and default_jenkins_builds_last_stage_duration_milliseconds_summary_sum metrics #464

Closed janpolito closed 1 year ago

janpolito commented 1 year ago

Jenkins and plugins versions report

Environment Jenkins: 2.361.1 OS: Linux - 3.10.0-957.el7.x86_64 --- ace-editor:1.1 analysis-model-api:10.17.0 ansible:1.1 ansicolor:1.0.2 antisamy-markup-formatter:2.7 apache-httpcomponents-client-4-api:4.5.13-138.v4e7d9a_7b_a_e61 authentication-tokens:1.4 bitbucket:223.vd12f2bca5430 blueocean:1.25.8 blueocean-autofavorite:1.2.5 blueocean-bitbucket-pipeline:1.25.8 blueocean-commons:1.25.8 blueocean-config:1.25.8 blueocean-core-js:1.25.8 blueocean-dashboard:1.25.8 blueocean-display-url:2.4.1 blueocean-events:1.25.8 blueocean-git-pipeline:1.25.8 blueocean-github-pipeline:1.25.8 blueocean-i18n:1.25.8 blueocean-jwt:1.25.8 blueocean-personalization:1.25.8 blueocean-pipeline-api-impl:1.25.8 blueocean-pipeline-editor:1.25.8 blueocean-pipeline-scm-api:1.25.8 blueocean-rest:1.25.8 blueocean-rest-impl:1.25.8 blueocean-web:1.25.8 bootstrap4-api:4.6.0-5 bootstrap5-api:5.2.1-3 bouncycastle-api:2.26 branch-api:2.1046.v0ca_37783ecc5 caffeine-api:2.9.3-65.v6a_47d0f4d1fe checks-api:1.7.5 cloudbees-bitbucket-branch-source:791.vb_eea_a_476405b cloudbees-disk-usage-simple:178.v1a_4d2f6359a_8 cloudbees-folder:6.758.vfd75d09eea_a_1 command-launcher:90.v669d7ccb_7c31 commons-lang3-api:3.12.0-36.vd97de6465d5b_ commons-text-api:1.10.0-27.vb_fa_3896786a_7 configuration-as-code:1559.v38a_b_2e3b_6b_b_7 credentials:1189.vf61b_a_5e2f62e credentials-binding:523.vd859a_4b_122e6 cucumber-reports:5.7.3 data-tables-api:1.12.1-4 display-url-api:2.3.6 docker-commons:1.21 docker-java-api:3.2.13-37.vf3411c9828b9 docker-plugin:1.2.10 docker-workflow:521.v1a_a_dd2073b_2e durable-task:501.ve5d4fc08b0be echarts-api:5.4.0-1 extended-read-permission:3.2 external-monitor-job:203.v683c09d993b_9 favorite:2.4.1 font-awesome-api:6.2.0-3 forensics-api:1.16.0 generic-webhook-trigger:1.85.2 git:4.12.1 git-client:3.12.1 git-server:99.va_0826a_b_cdfa_d github:1.35.0 github-api:1.303-400.v35c2d8258028 github-branch-source:1695.v88de84e9f6b_9 greenballs:1.15.1 handlebars:3.0.8 handy-uri-templates-2-api:2.1.8-22.v77d5b_75e6953 htmlpublisher:1.31 icon-shim:3.0.0 instance-identity:116.vf8f487400980 ionicons-api:31.v4757b_6987003 jackson2-api:2.13.4-293.vee957901b_6fb jakarta-activation-api:2.0.1-2 jakarta-mail-api:2.0.1-2 javadoc:226.v71211feb_e7e9 javax-activation-api:1.2.0-5 javax-mail-api:1.6.2-8 jaxb:2.3.6-2 jdk-tool:55.v1b_32b_6ca_f9ca jenkins-design-language:1.25.8 jersey2-api:2.37-1 jira:3.8 jjwt-api:0.11.5-77.v646c772fddb_0 jnr-posix-api:3.1.15-2 jobConfigHistory:1176.v1b_4290db_41a_5 jquery-detached:1.2.1 jquery3-api:3.6.1-2 jsch:0.1.55.61.va_e9ee26616e7 junit:1153.v1c24f1a_d2553 kubernetes:3724.v0920c1e0ec69 kubernetes-client-api:5.12.2-193.v26a_6078f65a_9 kubernetes-credentials:0.9.0 ldap:2.12 leastload:3.0.0 locale:180.v207501dff9b_a_ lockable-resources:2.18 mailer:438.v02c7f0a_12fa_4 matrix-auth:3.1.5 matrix-project:785.v06b_7f47b_c631 mercurial:1251.va_b_121f184902 metrics:4.2.10-389.v93143621b_050 mina-sshd-api-common:2.9.1-44.v476733c11f82 mina-sshd-api-core:2.9.1-44.v476733c11f82 momentjs:1.1.1 monitoring:1.91.0 nexus-artifact-uploader:2.13 okhttp-api:4.9.3-108.v0feda04578cf pam-auth:1.10 parameterized-scheduler:1.1 pipeline-build-step:2.18 pipeline-graph-analysis:195.v5812d95a_a_2f9 pipeline-groovy-lib:612.v84da_9c54906d pipeline-input-step:451.vf1a_a_4f405289 pipeline-milestone-step:101.vd572fef9d926 pipeline-model-api:2.2114.v2654ca_721309 pipeline-model-declarative-agent:1.1.1 pipeline-model-definition:2.2114.v2654ca_721309 pipeline-model-extensions:2.2114.v2654ca_721309 pipeline-rest-api:2.26 pipeline-stage-step:296.v5f6908f017a_5 pipeline-stage-tags-metadata:2.2114.v2654ca_721309 pipeline-stage-view:2.26 plain-credentials:139.ved2b_9cf7587b plot:2.1.11 plugin-util-api:2.18.0 popper-api:1.16.1-3 popper2-api:2.11.6-2 prism-api:1.29.0-1 prometheus:2.0.11 pubsub-light:1.17 rebuild:1.34 scm-api:621.vda_a_b_055e58f7 script-security:1183.v774b_0b_0a_a_451 snakeyaml-api:1.32-86.ve3f030a_75631 sonar:2.14 sse-gateway:1.26 ssh-agent:295.v9ca_a_1c7cc3a_a_ ssh-credentials:305.v8f4381501156 ssh-slaves:2.846.v1b_70190624f5 ssh-steps:2.0.39.v831c5e6468b_c sshd:3.249.v2dc2ea_416e33 stashNotifier:1.28 structs:324.va_f5d6774f3a_d text-finder:1.20 timestamper:1.20 token-macro:308.v4f2b_ed62b_b_16 trilead-api:2.72.v2a_3236754f73 variant:59.vf075fe829ccb warnings-ng:9.20.1 windows-slaves:1.8.1 workflow-aggregator:590.v6a_d052e5a_a_b_5 workflow-api:1200.v8005c684b_a_c6 workflow-basic-steps:994.vd57e3ca_46d24 workflow-cps:2802.v5ea_628154b_c2 workflow-cps-global-lib:588.v576c103a_ff86 workflow-durable-task-step:1206.v8a_d5f86e336b workflow-job:1239.v71b_b_a_124a_725 workflow-multibranch:716.vc692a_e52371b_ workflow-scm-step:400.v6b_89a_1317c9a_ workflow-step-api:639.v6eca_cd8c04a_a_ workflow-support:838.va_3a_087b_4055b

What Operating System are you using (both controller, and any agents involved in the problem)?

CentOS 7

Reproduction steps

Install prometheus 2.0.11 Run pipeline with stages Check metric: http://jenkins_url/prometheus default_jenkins_builds_last_stage_duration_milliseconds_summary_count and default_jenkins_builds_last_stage_duration_milliseconds_summary_sum metrics are missing. Previously we were using 2.0.10 and no such issue.

Expected Results

default_jenkins_builds_last_stage_duration_milliseconds_summary_count and default_jenkins_builds_last_stage_duration_milliseconds_summary_sum metrics should be exposed.

Actual Results

default_jenkins_builds_last_stage_duration_milliseconds_summary_count and default_jenkins_builds_last_stage_duration_milliseconds_summary_sum metrics are missing.

Anything else?

No response

markjacksonfishing commented 1 year ago

Can you provide any logs @janpolito

trolleybusses commented 1 year ago

I have found that build status counts are not being exposed in 2.0.11, also. e.g. default_jenkins_builds_success_build_count no longer exists, but I do see emtech_jenkins_builds_success_build_count_created and emtech_jenkins_builds_success_build_count_total.

This is resolved when rolling back to 2.0.10.

What sort of logs are you looking for @markyjackson-taulia ? I can see if I can find any.

garceger commented 1 year ago

I am also experiencing the same issue where certain metrics, specifically default_jenkins_builds_last_stage_duration_milliseconds_summary_count and default_jenkins_builds_last_stage_duration_milliseconds_summary_sum are no longer being exposed in the application.

Rollback to a previous version is not an option for me, and I would appreciate it if the responsible parties could provide some information or an alternative resolution for this problem.

Waschndolos commented 1 year ago

@garceger. I've installed the 2.0.14 version (built locally) here. The requested metrics are available there. I'm a maintainer for this plugin since yesterday - so still getting in to this. But my goal is to release a new version to jenkins (see https://github.com/jenkinsci/prometheus-plugin/issues/481). Guess the problems you're describe here will be resolved after the update.

garceger commented 1 year ago

@Waschndolos Thank you for the information and for working on resolving the issue. Can you let me know when the update will be released to Jenkins and if there is any interim solution or workaround that can be implemented in the meantime? I am looking forward to the update and would appreciate if you could keep me informed about the progress. Thank you!

Waschndolos commented 1 year ago

I'm planing to work on this today after work. Probably I need to release 2.1.0 which requires Jenkins 2.361 and higher. I'll check if I can keep the Jenkins version lower - but no promises :)

garceger commented 1 year ago

Thank you for the update.

I understand the challenge of possibly requiring a higher Jenkins version. I would prefer if a lower version of Jenkins could be used, if possible. I appreciate you taking the time to look into this today.

Waschndolos commented 1 year ago

Quick Update. I've released 2.1.0. The binaries are pushed to jenkins artifactory. I've tried to republish the 2.0.14 release which could have run on an older version of jenkins but I wasn't able to unfortunately. I'll keep this ticket open until the release appears in the official site https://plugins.jenkins.io/prometheus/

garceger commented 1 year ago

Thank you for the quick update and for releasing version 2.1.0. Unfortunately, it looks like this solution will not work for me as it requires a higher version of Jenkins. I appreciate the efforts you made to try and republish version 2.0.14 for those running on older versions of Jenkins. Thanks again for your hard work on this.

Waschndolos commented 1 year ago

What you could try as a workaround is to checkout the Tag for 2.0.14, change the parent pom version to 4.38 and build the hpi locally for yourself. That's what I did before I became maintainer of this plugin to fix the issue on my Jenkins.