Skip to content

Conversation

@OwenCorrigan76
Copy link
Contributor

@OwenCorrigan76 OwenCorrigan76 commented Jan 7, 2026

Type of change

  • Bugfix

Description

This PR addresses the follwoing issue:
#12126

The Request Handler Avg Idle Percent dashboard is now showing a percentage average instead of an ever increasing counter.

GrafanaD

Checklist

Please go through this checklist and make sure all applicable tasks have been done

  • Write tests
  • Make sure all tests pass
  • Update documentation
  • Check RBAC rights for Kubernetes / OpenShift roles
  • Try your changes from Pod inside your Kubernetes and OpenShift cluster, not just locally
  • Reference relevant issue(s) and close them after merging
  • Update CHANGELOG.md
  • Supply screenshots for visual changes, such as Grafana dashboards

@OwenCorrigan76 OwenCorrigan76 added this to the 0.50.0 milestone Jan 7, 2026
@codecov
Copy link

codecov bot commented Jan 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.98%. Comparing base (27e0ee2) to head (9624045).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main   #12289   +/-   ##
=========================================
  Coverage     74.97%   74.98%           
- Complexity     6640     6642    +2     
=========================================
  Files           373      373           
  Lines         25355    25355           
  Branches       3404     3404           
=========================================
+ Hits          19010    19012    +2     
  Misses         4953     4953           
+ Partials       1392     1390    -2     

see 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@OwenCorrigan76 OwenCorrigan76 self-assigned this Jan 7, 2026
@OwenCorrigan76 OwenCorrigan76 requested review from a team and fvaleri January 7, 2026 12:10
{
"datasource": "${DS_PROMETHEUS}",
"expr": "sum(kafka_server_kafkarequesthandlerpool_requesthandleravgidlepercent_total{namespace=\"$kubernetes_namespace\",strimzi_io_cluster=\"$strimzi_cluster_name\",kubernetes_pod_name=~\"$strimzi_cluster_name-$kafka_broker\"}*100) by (kubernetes_pod_name)",
"expr": "sum by (kubernetes_pod_name) (rate(kafka_server_kafkarequesthandlerpool_requesthandleravgidlepercent_total{namespace=\"$kubernetes_namespace\",strimzi_io_cluster=\"$strimzi_cluster_name\",kubernetes_pod_name=~\"$strimzi_cluster_name-$kafka_broker\"}[5m]) / 1e9 * 100)",
Copy link
Member

@fvaleri fvaleri Jan 7, 2026

Choose a reason for hiding this comment

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

In order to make the query responsive to how users interact with the dashboard, I would replace the fixed [5m] with [$__rate_interval]. I was also wondering if irate (instantaneous rate) would be better in this case, as we want to know the current state of the nodes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @fvaleri. Will try irate and investigate results.

Copy link
Member

@fvaleri fvaleri Jan 8, 2026

Choose a reason for hiding this comment

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

The use of irate vs rate is a genuine question from me to people with more experience with PromQL. To me it looks like a better fit for this kind of metric.

cc @mimaison

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here is an image of the graph using irate instead of rate if that helps:
irate

Copy link
Contributor

Choose a reason for hiding this comment

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

Whichever function to prefer kind of depends. I think a more important aspect for the sample dashboards is consistency. It seems irate() is use for most graphs in this dashboard, so I'd stick to that for this query.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed that irate() is more consistant with the rest of the queries.

Copy link
Member

Choose a reason for hiding this comment

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

@OwenCorrigan76 fyi, the [$__rate_interval] part of my comment is not yet addressed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry @fvaleri. Will address

@OwenCorrigan76 OwenCorrigan76 force-pushed the Fix_RequestHandlerAvgIdlePercent_metric_bug branch from c36b79c to 56a2667 Compare January 9, 2026 15:39
@scholzj scholzj modified the milestones: 0.50.0, 0.51.0 Jan 14, 2026
Signed-off-by: OwenCorrigan76 <owencorrigan76@gmail.com>
Signed-off-by: OwenCorrigan76 <owencorrigan76@gmail.com>
@OwenCorrigan76 OwenCorrigan76 force-pushed the Fix_RequestHandlerAvgIdlePercent_metric_bug branch from 56a2667 to 06d1049 Compare January 19, 2026 13:53
Signed-off-by: OwenCorrigan76 <owencorrigan76@gmail.com>
@OwenCorrigan76 OwenCorrigan76 force-pushed the Fix_RequestHandlerAvgIdlePercent_metric_bug branch from 06d1049 to 9624045 Compare January 19, 2026 13:56
Copy link
Member

@fvaleri fvaleri left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

@ppatierno ppatierno merged commit 892b532 into strimzi:main Jan 20, 2026
25 checks passed
@scholzj
Copy link
Member

scholzj commented Jan 20, 2026

@ppatierno This does not have the required approvals!!!

@ppatierno
Copy link
Member

@ppatierno This does not have the required approvals!!!

I got confused, my bad (no need for 3 exclamation marks though ;-)) If any @strimzi/maintainers doesn't agree with the change please open another PR to revert it back or propose a different solution.

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.

5 participants