- Notifications
You must be signed in to change notification settings - Fork 516
Improve ClickHouse Keeper Grafana Dashboard #1872
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
base: 0.25.6
Are you sure you want to change the base?
Conversation
… fix-keeper-dashboard
Slach 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.
thanks for contribution, really appreciated to sync metrics names
in our prometheus scraping config we use pod_name, not pod
please use following commands to check your dashboard changes
minikube delete minikube start kubectl create ns test helm install -n test clickhouse-operator ./deploy/helm/clickhouse-operator/ NO_WAIT=1 bash -xe ./deploy/prometheus/create-prometheus.sh NO_WAIT=1 bash -xe ./deploy/grafana/grafana-with-grafana-operator/install-grafana-operator.sh NO_WAIT=1 bash -xe ./deploy/grafana/grafana-with-grafana-operator/install-grafana-with-operator.sh kubectl apply -f ./docs/chk-examples/01-chi-simple-with-keeper.yaml | @Slach ah i did miss the relabel config ... ok with that it works, correct. However i think this is kind of |
Slach 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.
too many changes which not related to dashboard improvements
thanks to adopt script to MacOS
But please don't break name conversion, look to initial prometheus scraping config and rollback to pod_name and container_name
| interval: 30s | ||
| input_series: | ||
| - series: 'up{app="clickhouse-operator", pod_name="clickhouse-operator-XXX"}' | ||
| - series: 'up{app="clickhouse-operator", pod="clickhouse-operator-XXX"}' |
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.
rollback to pod_name please
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.
why? most of the CNCF projects use pod instead of pod_name today. If you apply your prometheus scrape config other metrics in your cluster will be broken. With this change we would be more streamlined with other projects and won't break other labels.
If you stick to pod_name you have to deploy a separate prometheus instance which only scrapes altinity pod labels (and transforms them). With my approach one prometheus can scrape the whole labels from all pods in the cluster and it won't break.
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.
why?
if you change pod_name > pod, container_name -> container
then you need also check it in tests/*
most of the CNCF projects use pod instead of pod_name today.
I agree.
Unfortunately, this break doesn't allow syncing too many things in our internal infrastructure, which is not open-sourced.
So if your improvements here just rename pod_name > pod, container_name > container, we need more valuable changes
| "uid": "${DS_PROMETHEUS}" | ||
| }, | ||
| "definition": "label_values(up{container_name=\"clickhouse-keeper\"},namespace)", | ||
| "definition": "label_values({__name__=~\"ClickHouse.*Keeper.*\",pod=~\"chk-.*\"},namespace)", |
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 don't understand what exactly you trying to improve here? I don't see improvements, only breaks old name conversions
up{container_name='clickhouse-keeper'} will have the same result with {__name__=~\"ClickHouse.*Keeper.*\",pod=~\"chk-.*\"
both could be broken
chk-.* could be broken with chk.spec.templates.podTemplates.generateName
and clickhouse-keeper container name could be broken with chk.spec.templates.podTemplates.spec.containers
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.
up is metrics which generated from prometheus itself after Kubernetes pod discovery.
… fix-keeper-dashboard Signed-off-by: Slach <bloodjazman@gmail.com> # Conflicts: # deploy/prometheus/prometheus-alert-rules-chkeeper.yaml

Fix ClickHouse Keeper Grafana Dashboard
fix #1844
Problem
The ClickHouse Keeper dashboard was not working correctly due to:
pod_namevspod,container_namevscontainer)Changes
Label Fixes
pod_name→podin all queries and template variablespod, notpod_namecontainer_name="clickhouse-keeper"filters from all panel queriescontainer, notcontainer_name{{pod_name}}to{{pod}}across all panelsTemplate Variable Improvements
Before:
After:
Benefits: