Read-only archive. These discussions are from Tracston's earlier
technical forum and are kept online because the answers are still useful.
New replies are closed. Need help with something like this?
Talk to us.
Question
3 Nov 2020
Problem
User wants to add filter by node kubernetes dashboard the results on each graph
Solution
Add to your query the node parameter to filter by
”expr”: “sum by (pod) (rate(container_cpu_usage_seconds_total{job=\”kubelet\”, image!=\”\”,container!=\”POD\”, pod=~\”$pod\”, namespace=\”{{ .Release.Namespace }}\”,node=~\”$node\”}[1m]))”
and add to templating section the following settings to query the nodes list
{”allValue”: null,”current”: {”text”: “All”,”value”: “$__all”},”datasource”: “Prometheus”,”hide”: 0,”includeAll”: true,”label”: “Node”,”multi”: true,”name”: “node”,”options”: [],”query”: “label_values(kube_node_info, node)”,”refresh”: 2,”regex”: “”,”skipUrlSync”: false,”sort”: 0,”tagValuesQuery”: “”,”tags”: [],”tagsQuery”: “”,”type”: “query”,”useTags”: false}
Note
Make sure for check sensitive for the Name: should be all lower cases
Need this fixed properly?
We do this for a living.
Kubernetes, DevOps and platform engineering, delivered in days — not another weekend lost to a stack trace.
Start a project →