diff --git a/charts/iperf3-monitor/grafana/iperf3-dashboard.json b/charts/iperf3-monitor/grafana/iperf3-dashboard.json new file mode 100644 index 0000000..58c2b3f --- /dev/null +++ b/charts/iperf3-monitor/grafana/iperf3-dashboard.json @@ -0,0 +1,194 @@ +{ +"__inputs": [], +"__requires": [ +{ +"type": "grafana", +"id": "grafana", +"name": "Grafana", +"version": "8.0.0" +}, +{ +"type": "datasource", +"id": "prometheus", +"name": "Prometheus", +"version": "1.0.0" +} +], +"annotations": { +"list": [ +{ +"builtIn": 1, +"datasource": { +"type": "grafana", +"uid": "-- Grafana --" +}, +"enable": true, +"hide": true, +"iconColor": "rgba(0, 211, 255, 1)", +"name": "Annotations & Alerts", +"type": "dashboard" +} +] +}, +"editable": true, +"fiscalYearStartMonth": 0, +"gnetId": null, +"graphTooltip": 0, +"id": null, +"links": [], +"panels": [ +{ +"datasource": { +"type": "prometheus", +"uid": "prometheus" +}, +"gridPos": { +"h": 9, +"w": 24, +"x": 0, +"y": 0 +}, +"id": 2, +"targets": [ +{ +"expr": "avg(iperf_network_bandwidth_mbps) by (source_node, destination_node)", +"format": "heatmap", +"legendFormat": "{{source_node}} -> {{destination_node}}", +"refId": "A" +} +], +"cards": { "cardPadding": null, "cardRound": null }, +"color": { +"mode": "spectrum", +"scheme": "red-yellow-green", +"exponent": 0.5, +"reverse": false +}, +"dataFormat": "tsbuckets", +"yAxis": { "show": true, "format": "short" }, +"xAxis": { "show": true } +}, +{ +"title": "Bandwidth Over Time (Source: $source_node, Dest: $destination_node)", +"type": "timeseries", +"datasource": { +"type": "prometheus", +"uid": "prometheus" +}, +"gridPos": { +"h": 8, +"w": 12, +"x": 0, +"y": 9 +}, +"targets": [ +{ +"expr": "iperf_network_bandwidth_mbps{source_node=~\"^$source_node$\", destination_node=~\"^$destination_node$\", protocol=~\"^$protocol$\"}", +"legendFormat": "Bandwidth", +"refId": "A" +} +], +"fieldConfig": { +"defaults": { +"unit": "mbps" +} +} +}, +{ +"title": "Jitter Over Time (Source: $source_node, Dest: $destination_node)", +"type": "timeseries", +"datasource": { +"type": "prometheus", +"uid": "prometheus" +}, +"gridPos": { +"h": 8, +"w": 12, +"x": 12, +"y": 9 +}, +"targets": [ +{ +"expr": "iperf_network_jitter_ms{source_node=~\"^$source_node$\", destination_node=~\"^$destination_node$\", protocol=\"udp\"}", +"legendFormat": "Jitter", +"refId": "A" +} +], +"fieldConfig": { +"defaults": { +"unit": "ms" +} +} +} +], +"refresh": "30s", +"schemaVersion": 36, +"style": "dark", +"tags": ["iperf3", "network", "kubernetes"], +"templating": { +"list": [ +{ +"current": {}, +"datasource": { +"type": "prometheus", +"uid": "prometheus" +}, +"definition": "label_values(iperf_network_bandwidth_mbps, source_node)", +"hide": 0, +"includeAll": false, +"multi": false, +"name": "source_node", +"options": [], +"query": "label_values(iperf_network_bandwidth_mbps, source_node)", +"refresh": 1, +"regex": "", +"skipUrlSync": false, +"sort": 1, +"type": "query" +}, +{ +"current": {}, +"datasource": { +"type": "prometheus", +"uid": "prometheus" +}, +"definition": "label_values(iperf_network_bandwidth_mbps{source_node=~\"^$source_node$\"}, destination_node)", +"hide": 0, +"includeAll": false, +"multi": false, +"name": "destination_node", +"options": [], +"query": "label_values(iperf_network_bandwidth_mbps{source_node=~\"^$source_node$\"}, destination_node)", +"refresh": 1, +"regex": "", +"skipUrlSync": false, +"sort": 1, +"type": "query" +}, +{ +"current": { "selected": true, "text": "tcp", "value": "tcp" }, +"hide": 0, +"includeAll": false, +"multi": false, +"name": "protocol", +"options": [ +{ "selected": true, "text": "tcp", "value": "tcp" }, +{ "selected": false, "text": "udp", "value": "udp" } +], +"query": "tcp,udp", +"skipUrlSync": false, +"type": "custom" +} +] +}, +"time": { +"from": "now-1h", +"to": "now" +}, +"timepicker": {}, +"timezone": "browser", +"title": "Kubernetes iperf3 Network Performance", +"uid": "k8s-iperf3-dashboard", +"version": 1, +"weekStart": "" +} diff --git a/charts/iperf3-monitor/templates/grafana-dashboard-configmap.yaml b/charts/iperf3-monitor/templates/grafana-dashboard-configmap.yaml new file mode 100644 index 0000000..f28b429 --- /dev/null +++ b/charts/iperf3-monitor/templates/grafana-dashboard-configmap.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-grafana-dashboard + labels: + grafana_dashboard: "1" + app.kubernetes.io/name: {{ include "iperf3-monitor.name" . }} + helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} +data: + iperf3-dashboard.json: | + {{ .Files.Get "grafana/iperf3-dashboard.json" | nindent 4 }}