-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 filter bug in dashboards #10199
fix filter bug in dashboards #10199
Conversation
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 for the PR. Any changes to the dashboards have to be done to the packaging/
directory. The examples/
directory is updated only as part of an Strimzi release.
$ | ||
kubectl exec -ti my-cluster-entity-operator-6879c6b9d9-ccldp -c topic-operator -- curl -s localhost:8080/metrics | grep strimzi.resources |
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.
This seems wrong?
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.
This seems wrong?
Sorry, removed the change.
8f2a0af
to
d9f4c11
Compare
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.
@ldpliu I tried the new dashboards and they work fine, but you still have to revert changes in examples/ and helm-charts/ dirs. Just keep changes under packaging/ dir. Thanks.
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.
As I said before, do not change this file.
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.
As I said before, do not change this file.
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.
As I said before, do not change this file.
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.
As I said before, do not change this file.
@@ -1143,7 +1143,7 @@ | |||
"targets": [ | |||
{ | |||
"datasource": "${DS_PROMETHEUS}", | |||
"expr": "sum(jvm_memory_used_bytes{namespace=\"$kubernetes_namespace\",kubernetes_pod_name=~\"$strimzi_cluster_name-$kafka_broker\",strimzi_io_name=\"$strimzi_cluster_name-kafka\"}) by (kubernetes_pod_name)", | |||
"expr": "sum(jvm_memory_bytes_used{namespace=\"$kubernetes_namespace\",kubernetes_pod_name=~\"$strimzi_cluster_name-$kafka_broker\",strimzi_io_name=\"$strimzi_cluster_name-kafka\"}) by (kubernetes_pod_name)", |
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.
This change needs to be reverted.
@@ -1007,7 +1007,7 @@ | |||
"targets": [ | |||
{ | |||
"datasource": "${DS_PROMETHEUS}", | |||
"expr": "sum(jvm_memory_used_bytes{namespace=\"$kubernetes_namespace\",kubernetes_pod_name=~\"$strimzi_cluster_name-$zk_node\",strimzi_io_name=\"$strimzi_cluster_name-zookeeper\"}) by (kubernetes_pod_name)", | |||
"expr": "sum(jvm_memory_bytes_used{namespace=\"$kubernetes_namespace\",kubernetes_pod_name=~\"$strimzi_cluster_name-$zk_node\",strimzi_io_name=\"$strimzi_cluster_name-zookeeper\"}) by (kubernetes_pod_name)", |
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.
This change needs to be reverted.
@@ -1143,7 +1143,7 @@ | |||
"targets": [ | |||
{ | |||
"datasource": "${DS_PROMETHEUS}", | |||
"expr": "sum(jvm_memory_used_bytes{namespace=\"$kubernetes_namespace\",kubernetes_pod_name=~\"$strimzi_cluster_name-$kafka_broker\",strimzi_io_name=\"$strimzi_cluster_name-kafka\"}) by (kubernetes_pod_name)", | |||
"expr": "sum(jvm_memory_bytes_used{namespace=\"$kubernetes_namespace\",kubernetes_pod_name=~\"$strimzi_cluster_name-$kafka_broker\",strimzi_io_name=\"$strimzi_cluster_name-kafka\"}) by (kubernetes_pod_name)", |
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.
This change needs to be reverted.
@@ -1007,7 +1007,7 @@ | |||
"targets": [ | |||
{ | |||
"datasource": "${DS_PROMETHEUS}", | |||
"expr": "sum(jvm_memory_used_bytes{namespace=\"$kubernetes_namespace\",kubernetes_pod_name=~\"$strimzi_cluster_name-$zk_node\",strimzi_io_name=\"$strimzi_cluster_name-zookeeper\"}) by (kubernetes_pod_name)", | |||
"expr": "sum(jvm_memory_bytes_used{namespace=\"$kubernetes_namespace\",kubernetes_pod_name=~\"$strimzi_cluster_name-$zk_node\",strimzi_io_name=\"$strimzi_cluster_name-zookeeper\"}) by (kubernetes_pod_name)", |
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.
This change needs to be reverted.
@@ -960,7 +960,7 @@ | |||
"targets": [ | |||
{ | |||
"datasource": "${DS_PROMETHEUS}", | |||
"expr": "sum(kubelet_volume_stats_available_bytes{namespace=\"$kubernetes_namespace\",persistentvolumeclaim=~\"data(-[0-9]+)?-$strimzi_cluster_name-(kafka|$pool_name)-[0-9]+\"}) by (persistentvolumeclaim)", | |||
"expr": "sum(kubelet_volume_stats_available_bytes{namespace=\"$kubernetes_namespace\",persistentvolumeclaim=~\"data(-[0-9]+)?-$strimzi_cluster_name-$kafka_broker\"}) by (persistentvolumeclaim)", |
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.
How does this work with node pools as you are replacing the pool name?
Also, I guess this change should be done to the KRaft dashboard as well?
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.
But it defaults to something like .*
=> so that surely doesn't work the same way as what was there. It should be now matching all PVCs which seems more wrong then ignoring the broker selector. Or how does it filter out non-Kafka PVCs?
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.
But it defaults to something like
.*
=> so that surely doesn't work the same way as what was there. It should be now matching all PVCs which seems more wrong then ignoring the broker selector. Or how does it filter out non-Kafka PVCs?
I am not really understand what you mean. The current filter should works. It only filter the pvcs which has name: data(-[0-9]+)?-$strimzi_cluster_name-$kafka_broker
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.
But when no broker is selected, it would pick something like this data(-[0-9]+)?-$strimzi_cluster_name-.*
and that should pick for example ZooKeeper volumes in Kafka dashboard and vice versa.
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.
How about this?
kubelet_volume_stats_available_bytes{namespace="multicluster-global-hub",persistentvolumeclaim=~"data(-[0-9]+)?-my-cluster-.*",persistentvolumeclaim!~".*zookeeper(-[0-9]+)?$"}
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.
I'm not sure if that would work in all environments. If yes, it might be an option I guess.
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.
Changed the code to use kubelet_volume_stats_available_bytes{namespace="multicluster-global-hub",persistentvolumeclaim=~"data(-[0-9]+)?-my-cluster-.*",persistentvolumeclaim!~".*zookeeper(-[0-9]+)?$"}
please help to review again.
48c86dd
to
daf94c9
Compare
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.
I guess the |
You are right. Removed |
@@ -329,7 +329,7 @@ | |||
"targets": [ | |||
{ | |||
"datasource": "${DS_PROMETHEUS}", | |||
"expr": "sum(kubelet_volume_stats_available_bytes{namespace=\"$kubernetes_namespace\",persistentvolumeclaim=~\"data(-[0-9]+)?-$strimzi_cluster_name-(kafka|$pool_name)-[0-9]+\"}) by (persistentvolumeclaim)", | |||
"expr": "sum(kubelet_volume_stats_available_bytes{namespace=\"$kubernetes_namespace\",persistentvolumeclaim=~\"data(-[0-9]+)?-$strimzi_cluster_name-$kafka_broker\", persistentvolumeclaim!~\".*zookeeper(-[0-9]+)?$\"}) by (persistentvolumeclaim)", |
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.
I gave this a try. The KRaft dashboard is not using $kafka_broker
but $kraft_node
. Could you please fix this?
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 same is of course also in the Helm Chart dashboard)
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.
I gave this a try. The KRaft dashboard is not using
$kafka_broker
but$kraft_node
. Could you please fix this?
Changed, please help to try again
Signed-off-by: ldpliu <[email protected]>
hey, sorry for delay, I just tried the changes and all of them works fine for my deployment. I used latest changes that were committed today. |
Thanks for the PR @ldpliu |
Type of change
Select the type of your PR
Description
Please describe your pull request
Checklist
Please go through this checklist and make sure all applicable tasks have been done