Forum breadcrumbs – You are here:Tracston Community Forum – DevOps, Micro Services, Cloud, Infrastructure, Development, Monitoring and more…Monitoring, Logging, Tracing: MonitoringGrafanaGrafana Dashboard – Filter Kubern …
You need to log in to create posts and topics.
Grafana Dashboard – Filter Kubernetes metrics by Node
moshe@moshe
#1 · 03/11/2020, 1:07 pm
Quote from moshe on 03/11/2020, 1:07 pmProblem
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}NoteMake sure for check sensitive for the Name: should be all lower cases
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
Click for thumbs down.0Click for thumbs up.0