-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fix Request_Handler_Avg_Idle_Percent metric bug #12289
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
Fix Request_Handler_Avg_Idle_Percent metric bug #12289
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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 🚀 New features to boost your workflow:
|
| { | ||
| "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)", |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry @fvaleri. Will address
c36b79c to
56a2667
Compare
Signed-off-by: OwenCorrigan76 <owencorrigan76@gmail.com>
Signed-off-by: OwenCorrigan76 <owencorrigan76@gmail.com>
56a2667 to
06d1049
Compare
Signed-off-by: OwenCorrigan76 <owencorrigan76@gmail.com>
06d1049 to
9624045
Compare
fvaleri
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks.
|
@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. |

Type of change
Description
This PR addresses the follwoing issue:
#12126
The
Request Handler Avg Idle Percentdashboard is now showing a percentage average instead of an ever increasing counter.Checklist
Please go through this checklist and make sure all applicable tasks have been done