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

Jenkins Prometheus dashboard KPI and layout updates #721

Conversation

algchoo
Copy link
Contributor

@algchoo algchoo commented Feb 27, 2024

Description

This PR updates the layout and includes new KPIs for the Jenkins Prometheus dashboard.

Changes

Updated screenshot

jenkins-prometheus

Additional KPIs

Jobs

  • Time Spent In Buildable State
  • Time Spent In Waiting State
  • Time Spent In Blocked State

Build Queue

  • Size
  • Buildable Jobs
  • Pending Jobs
  • Blocked Jobs

@algchoo algchoo marked this pull request as ready for review February 29, 2024 22:51
@github-actions github-actions bot requested a review from johnbryan February 29, 2024 22:51
"plotType": "LINE",
"targetAxis": "Y1",
"timeSeriesQuery": {
"prometheusQuery": "(vm_memory_total_max{job=\"jenkins-metrics\",${Cluster},${Location},${Namespace}} - vm_memory_total_used{job=\"jenkins-metrics\",${Cluster},${Location},${Namespace}}) / vm_memory_total_max{job=\"jenkins-metrics\",${Cluster},${Location},${Namespace}} * 100.0"
"prometheusQuery": "(vm_memory_total_max{job=\"jenkins-metrics\",${Cluster},${Location},${Namespace}} - vm_memory_total_used{job=\"jenkins-metrics\",${Cluster},${Location},${Namespace}}) / vm_memory_total_max{job=\"jenkins-metrics\",${Cluster},${Location},${Namespace}} * 100.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed in a test environment we have, the job here is named jenkins instead of jenkins-metrics so this chart was blank. I'm not honestly sure if there's a standard name. What do you think of a looser regex match like job=~"jenkins.*" which at least catches both of our setups?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it's a standard, but in the documentation the PodMonitoring resource name is jenkins, whereas in the environment on our end, we named it jenkins-metrics. I think that with the documentation having jenkins in the example yaml, it's somewhat safe to assume that the word jenkins will be in the name somewhere. Does opting for job=~".*jenkins.*" make more sense in your opinion?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johnbryan I've pushed up my suggestion, let me know if you think it makes sense. Hope all is well!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks for the fix! (and apologies for slow replies here, I had some vacation time recently)

"plotType": "LINE",
"targetAxis": "Y1",
"timeSeriesQuery": {
"prometheusQuery": "vm_cpu_load{job=\"jenkins-metrics\",${Cluster},${Location},${Namespace}}"
"prometheusQuery": "vm_cpu_load{job=\"jenkins-metrics\",${Cluster},${Location},${Namespace}}",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment on job here

@algchoo algchoo force-pushed the dashboard/jenkins-kpi-layout-update branch from 0e8406f to 85e0035 Compare March 8, 2024 20:47
@johnbryan johnbryan merged commit 2d901a1 into GoogleCloudPlatform:master Mar 14, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants