Skip to content
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(grafana): Fix dashboard Hubble pod-flow-workload dashboard #1341

Merged
merged 1 commit into from
Feb 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 23 additions & 32 deletions deploy/hubble/grafana/dashboards/pod-flows-workload.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "count(\r\n sum by (source) (\r\n rate(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", source=~\"^$namespace/$workload\", verdict=\"forwarded\"}[10m])\r\n ) >= 0.01\r\n)",
"expr": "count(\r\n sum by (source) (\r\n rate(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", source=~\"^$namespace/$workload\", verdict=\"FORWARDED\"}[10m])\r\n ) >= 0.01\r\n)",
"hide": false,
"instant": true,
"legendFormat": "Pods with Outgoing Traffic",
Expand Down Expand Up @@ -200,7 +200,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "round(sum (rate(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", source=~\"^$namespace/$workload\", verdict=\"forwarded\"}[$__rate_interval])), 0.01)",
"expr": "round(sum (rate(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", source=~\"^$namespace/$workload\", verdict=\"FORWARDED\"}[$__rate_interval])), 0.01)",
"hide": false,
"instant": false,
"legendFormat": "Max Outgoing Traffic",
Expand Down Expand Up @@ -267,7 +267,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "round(sum (rate(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", source=~\"^$namespace/$workload\", verdict=\"forwarded\"}[$__rate_interval])), 0.01)",
"expr": "round(sum (rate(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", source=~\"^$namespace/$workload\", verdict=\"FORWARDED\"}[$__rate_interval])), 0.01)",
"hide": false,
"instant": false,
"legendFormat": "Min Outgoing Traffic",
Expand Down Expand Up @@ -334,7 +334,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "count(\r\n sum by (destination) (\r\n rate(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", destination=~\"^$namespace/$workload\", verdict=\"forwarded\"}[10m])\r\n ) >= 0.01\r\n)",
"expr": "count(\r\n sum by (destination) (\r\n rate(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", destination=~\"^$namespace/$workload\", verdict=\"FORWARDED\"}[10m])\r\n ) >= 0.01\r\n)",
"hide": false,
"instant": true,
"legendFormat": "Pods with Incoming Traffic",
Expand Down Expand Up @@ -401,7 +401,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "round(sum (rate(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", destination=~\"^$namespace/$workload\", verdict=\"forwarded\"}[$__rate_interval])), 0.01)",
"expr": "round(sum (rate(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", destination=~\"^$namespace/$workload\", verdict=\"FORWARDED\"}[$__rate_interval])), 0.01)",
"hide": false,
"instant": false,
"legendFormat": "Max Incoming Traffic",
Expand Down Expand Up @@ -468,7 +468,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "round(sum (rate(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", destination=~\"^$namespace/$workload\", verdict=\"forwarded\"}[$__rate_interval])), 0.01)",
"expr": "round(sum (rate(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", destination=~\"^$namespace/$workload\", verdict=\"FORWARDED\"}[$__rate_interval])), 0.01)",
"hide": false,
"instant": false,
"legendFormat": "Min Incoming Traffic",
Expand Down Expand Up @@ -535,7 +535,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "count (\r\n sum by (source) (\r\n rate(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", source=~\"^$namespace/$workload\", verdict=\"dropped\"}[10m])\r\n ) >= 0.01\r\n)",
"expr": "count (\r\n sum by (source) (\r\n rate(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", source=~\"^$namespace/$workload\", verdict=\"DROPPED\"}[10m])\r\n ) >= 0.01\r\n)",
"hide": false,
"instant": true,
"legendFormat": "Pods with Outgoing Drops",
Expand Down Expand Up @@ -602,7 +602,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "round(sum (rate(hubble_flows_processed_total{verdict=\"dropped\", cluster=\"$cluster\", instance=~\"$Nodes\", source=~\"^$namespace/$workload\"}[$__rate_interval])), 0.01)",
"expr": "round(sum (rate(hubble_flows_processed_total{verdict=\"DROPPED\", cluster=\"$cluster\", instance=~\"$Nodes\", source=~\"^$namespace/$workload\"}[$__rate_interval])), 0.01)",
"hide": false,
"instant": false,
"legendFormat": "Max Outgoing Drops",
Expand Down Expand Up @@ -669,7 +669,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "round(sum (rate(hubble_flows_processed_total{verdict=\"dropped\", cluster=\"$cluster\", instance=~\"$Nodes\", source=~\"^$namespace/$workload\"}[$__rate_interval])), 0.01)",
"expr": "round(sum (rate(hubble_flows_processed_total{verdict=\"DROPPED\", cluster=\"$cluster\", instance=~\"$Nodes\", source=~\"^$namespace/$workload\"}[$__rate_interval])), 0.01)",
"hide": false,
"instant": false,
"legendFormat": "Min Outgoing Drops",
Expand Down Expand Up @@ -736,7 +736,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "count (\r\n sum by (destination) (\r\n rate(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", destination=~\"^$namespace/$workload\", verdict=\"dropped\"}[10m])\r\n ) >= 0.01\r\n)",
"expr": "count (\r\n sum by (destination) (\r\n rate(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", destination=~\"^$namespace/$workload\", verdict=\"DROPPED\"}[10m])\r\n ) >= 0.01\r\n)",
"hide": false,
"instant": true,
"legendFormat": "Pods with Incoming Drops",
Expand Down Expand Up @@ -803,7 +803,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "round(sum (rate(hubble_flows_processed_total{verdict=\"dropped\", cluster=\"$cluster\", instance=~\"$Nodes\", destination=~\"^$namespace/$workload\"}[$__rate_interval])), 0.01)",
"expr": "round(sum (rate(hubble_flows_processed_total{verdict=\"DROPPED\", cluster=\"$cluster\", instance=~\"$Nodes\", destination=~\"^$namespace/$workload\"}[$__rate_interval])), 0.01)",
"hide": false,
"instant": false,
"legendFormat": "Max Incoming Drops",
Expand Down Expand Up @@ -870,7 +870,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "round(sum (rate(hubble_flows_processed_total{verdict=\"dropped\", cluster=\"$cluster\", instance=~\"$Nodes\", destination=~\"^$namespace/$workload\"}[$__rate_interval])), 0.01)",
"expr": "round(sum (rate(hubble_flows_processed_total{verdict=\"DROPPED\", cluster=\"$cluster\", instance=~\"$Nodes\", destination=~\"^$namespace/$workload\"}[$__rate_interval])), 0.01)",
"hide": false,
"instant": false,
"legendFormat": "Min Incoming Drops",
Expand Down Expand Up @@ -1702,7 +1702,7 @@
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "topk(10, round(sum by (source) (\r\n rate(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", source=~\"^$namespace/$workload\", verdict=\"dropped\"}[$__rate_interval])\r\n), 0.01)) > 0",
"expr": "topk(10, round(sum by (source) (\r\n rate(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", source=~\"^$namespace/$workload\", verdict=\"DROPPED\"}[$__rate_interval])\r\n), 0.01)) > 0",
"hide": false,
"legendFormat": "{{source}}",
"range": true,
Expand Down Expand Up @@ -1783,7 +1783,7 @@
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "topk(10, round(sum by (destination) (\r\n rate(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", destination=~\"^$namespace/$workload\", verdict=\"dropped\"}[$__rate_interval])\r\n), 0.01)) > 0",
"expr": "topk(10, round(sum by (destination) (\r\n rate(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", destination=~\"^$namespace/$workload\", verdict=\"DROPPED\"}[$__rate_interval])\r\n), 0.01)) > 0",
"hide": false,
"legendFormat": "{{destination}}",
"range": true,
Expand Down Expand Up @@ -1885,7 +1885,7 @@
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "round(\r\n sum by (source) (\r\n rate(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", source=~\"^$namespace/$workload\", verdict=\"dropped\"}[$__rate_interval])\r\n ), 0.01\r\n)",
"expr": "round(\r\n sum by (source) (\r\n rate(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", source=~\"^$namespace/$workload\", verdict=\"DROPPED\"}[$__rate_interval])\r\n ), 0.01\r\n)",
"legendFormat": "{{destination}}",
"range": true,
"refId": "A"
Expand Down Expand Up @@ -1986,7 +1986,7 @@
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "round(\r\n sum by (destination) (\r\n rate(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", destination=~\"^$namespace/$workload\", verdict=\"dropped\"}[$__rate_interval])\r\n ), 0.01\r\n)",
"expr": "round(\r\n sum by (destination) (\r\n rate(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", destination=~\"^$namespace/$workload\", verdict=\"DROPPED\"}[$__rate_interval])\r\n ), 0.01\r\n)",
"legendFormat": "{{destination}}",
"range": true,
"refId": "A"
Expand Down Expand Up @@ -3901,17 +3901,14 @@
"type": "prometheus",
"uid": "${datasource}"
},
"definition": "label_values(kube_node_info, cluster)",
"definition": "label_values(hubble_flows_processed_total, cluster)",
"hide": 0,
"includeAll": false,
"label": "Cluster",
"multi": false,
"name": "cluster",
"options": [],
"query": {
"query": "label_values(kube_node_info, cluster)",
"refId": "StandardVariableQuery"
},
"query": "label_values(hubble_flows_processed_total, cluster)",
"refresh": 2,
"regex": "",
"skipUrlSync": false,
Expand All @@ -3925,17 +3922,14 @@
"type": "prometheus",
"uid": "${datasource}"
},
"definition": "label_values(kube_node_info{cluster=\"$cluster\"},node)",
"definition": "label_values(hubble_flows_processed_total{cluster=\"$cluster\"}, instance)",
"hide": 0,
"includeAll": true,
"label": "Nodes",
"multi": true,
"name": "Nodes",
"options": [],
"query": {
"query": "label_values(kube_node_info{cluster=\"$cluster\"},node)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"query": "label_values(hubble_flows_processed_total{cluster=\"$cluster\"}, instance)",
"refresh": 2,
"regex": "",
"skipUrlSync": false,
Expand Down Expand Up @@ -3974,20 +3968,17 @@
"type": "prometheus",
"uid": "${datasource}"
},
"definition": "query_result(sum by (workload) (label_replace(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", destination=~\"^$namespace/[a-z0-9]+$\"}, \"workload\", \"$1\", \"destination\", \"^$namespace/([a-z0-9]+)\")) or sum by (workload) (label_replace(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", destination=~\"^$namespace/[a-z0-9]+-\"}, \"workload\", \"$1\", \"destination\", \"^$namespace/(.*)-[a-z0-9]+\"))or sum by (workload) (label_replace(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", source=~\"^$namespace/[a-z0-9]+$\"}, \"workload\", \"$1\", \"source\", \"^$namespace/([a-z0-9]+)\")) or sum by (workload) (label_replace(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", source=~\"^$namespace/[a-z0-9]+-\"}, \"workload\", \"$1\", \"source\", \"^$namespace/(.*)-[a-z0-9]+\")))",
"definition": "label_values(kube_pod_info{namespace=\"$namespace\"}, pod)",
"description": "",
"hide": 0,
"includeAll": false,
"label": "Workload",
"multi": false,
"name": "workload",
"options": [],
"query": {
"query": "query_result(sum by (workload) (label_replace(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", destination=~\"^$namespace/[a-z0-9]+$\"}, \"workload\", \"$1\", \"destination\", \"^$namespace/([a-z0-9]+)\")) or sum by (workload) (label_replace(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", destination=~\"^$namespace/[a-z0-9]+-\"}, \"workload\", \"$1\", \"destination\", \"^$namespace/(.*)-[a-z0-9]+\"))or sum by (workload) (label_replace(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", source=~\"^$namespace/[a-z0-9]+$\"}, \"workload\", \"$1\", \"source\", \"^$namespace/([a-z0-9]+)\")) or sum by (workload) (label_replace(hubble_flows_processed_total{cluster=\"$cluster\", instance=~\"$Nodes\", source=~\"^$namespace/[a-z0-9]+-\"}, \"workload\", \"$1\", \"source\", \"^$namespace/(.*)-[a-z0-9]+\")))",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"query": "label_values(kube_pod_info{namespace=\"$namespace\"}, pod)",
"refresh": 2,
"regex": "/workload=\"([-a-z0-9]+)/g",
"regex": "",
"skipUrlSync": false,
"sort": 1,
"type": "query"
Expand Down
Loading