-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Jenkins: 2.462.1
OS: Linux - 6.10.6-200.fc40.x86_64
Java: 11.0.24 - Red Hat, Inc. (OpenJDK 64-Bit Server VM)
---
build-failure-analyzer:2.5.2
kubernetes:4285.v50ed5f624918
kubernetes-client-api:6.10.0-240.v57880ce8b_0b_2
kubernetes-credentials:189.v90a_488b_d1d65
lockable-resources:1255.vf48745da_35d0
logstash:2.5.0218.v0a_ff8fefc12b_
metrics:4.2.21-451.vd51df8df52ec
prometheus:784.vea_eca_f6592eb_
prometheus-lockable-resources:1.0.0Jenkins: 2.462.1 OS: Linux - 6.10.6-200.fc40.x86_64 Java: 11.0.24 - Red Hat, Inc. (OpenJDK 64-Bit Server VM) --- build-failure-analyzer:2.5.2 kubernetes:4285.v50ed5f624918 kubernetes-client-api:6.10.0-240.v57880ce8b_0b_2 kubernetes-credentials:189.v90a_488b_d1d65 lockable-resources:1255.vf48745da_35d0 logstash:2.5.0218.v0a_ff8fefc12b_ metrics:4.2.21-451.vd51df8df52ec prometheus:784.vea_eca_f6592eb_ prometheus-lockable-resources:1.0.0
-
-
4288.v1719f9d0c854
There appears to be an unhappy interaction between:
- https://plugins.jenkins.io/metrics/
- https://plugins.jenkins.io/prometheus/
- https://plugins.jenkins.io/kubernetes/
Our https://jenkins.big.corp/prometheus/ Prometheus scrape endpoint is absolutely flooded with metrics like:
# HELP kubernetes_cloud_myproj_master_7116_zvf9t_provision_request_total Generated from Dropwizard metric import (metric=kubernetes.cloud.myproj_master_7116-zvf9t.provision.request, type=com.codahale.metrics.Meter)
# TYPE kubernetes_cloud_myproj_master_7116_zvf9t_provision_request_total counter
kubernetes_cloud_myproj_master_7116_zvf9t_provision_request_total 1.0
Around 50k lines in totaal. Which brings the scraping to a crawl.
But more importantly: I have a strong feeling that it is actually slowing Jenkins down as well, since the data is passed to the Metrics plugin, which in turn feeds the Prometheus plugin. All this data is processed every generation interval.
The culprit appears to be https://github.com/jenkinsci/kubernetes-plugin/blob/4287.v73451380b_576/src/main/java/org/csanchez/jenkins/plugins/kubernetes/MetricNames.java#L27
Which is triggered by: https://github.com/jenkinsci/kubernetes-plugin/blob/4287.v73451380b_576/src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesCloud.java#L602
I feel this should simply be removed unless there is a clear reason to keep it. It has the potential to balloon the active Metrics to astronomical proportions, which could lead to stability issues.
The other metrics I have no problem with:
kubernetes_cloud_pods_created 13475.0 kubernetes_cloud_pods_creation_failed 3430.0 kubernetes_cloud_pods_launched 9742.0 kubernetes_cloud_pods_terminated 16909.0 kubernetes_cloud_provision_nodes 16905.0
But those kubernetes_cloud_###_provision_request_total entries are killing.
There doesn't appear to be a mechanism to prevent the Kubernetes plugin from generating these metrics.