From b54f9eb693e3dc2921d3c96b3f6f419cc81a1233 Mon Sep 17 00:00:00 2001 From: kaichaosun Date: Tue, 11 Mar 2025 16:31:03 +0800 Subject: [PATCH 1/2] feat: bandwith metrics --- .../provisioning/dashboards/status-go.json | 550 ++++++++++++------ 1 file changed, 368 insertions(+), 182 deletions(-) diff --git a/grafana/provisioning/dashboards/status-go.json b/grafana/provisioning/dashboards/status-go.json index d73d653..02258f6 100644 --- a/grafana/provisioning/dashboards/status-go.json +++ b/grafana/provisioning/dashboards/status-go.json @@ -913,6 +913,371 @@ "title": "Bandwidth Usage", "type": "row" }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 47 + }, + "id": 18, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.5.1", + "targets": [ + { + "editorMode": "code", + "expr": "sum by (message_type) (statusgo_waku_raw_message_sent_total)", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Total Sent Message By Type", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 47 + }, + "id": 10, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.5.1", + "targets": [ + { + "disableTextWrap": false, + "editorMode": "code", + "expr": "statusgo_waku_raw_message_sent_total", + "fullMetaSearch": false, + "includeNullMetadata": true, + "legendFormat": "{{message_type}}", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "Total Sent Message by Type", + "type": "piechart" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 55 + }, + "id": 19, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.5.1", + "targets": [ + { + "editorMode": "code", + "expr": "sum by (message_type) (statusgo_waku_raw_message_size_bytes)", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Total Bytes of Sent Message By Type", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 55 + }, + "id": 11, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.5.1", + "targets": [ + { + "disableTextWrap": false, + "editorMode": "code", + "expr": "rate(statusgo_waku_raw_message_size_bytes[10m])", + "fullMetaSearch": false, + "includeNullMetadata": false, + "legendFormat": "{{message_type}}", + "range": true, + "refId": "A", + "useBackend": false + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "code", + "expr": "sum(rate(statusgo_waku_raw_message_size_bytes[10m]))", + "fullMetaSearch": false, + "hide": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "Total", + "range": true, + "refId": "B", + "useBackend": false + } + ], + "title": "Rate of Bytes of Sent Message by Type", + "type": "timeseries" + }, { "datasource": { "type": "prometheus", @@ -974,7 +1339,7 @@ "h": 8, "w": 12, "x": 0, - "y": 47 + "y": 63 }, "id": 1, "options": { @@ -1081,7 +1446,7 @@ "h": 8, "w": 12, "x": 12, - "y": 47 + "y": 63 }, "id": 4, "options": { @@ -1179,7 +1544,7 @@ "h": 8, "w": 12, "x": 0, - "y": 55 + "y": 71 }, "id": 9, "options": { @@ -1212,185 +1577,6 @@ ], "title": "Average messages sent every 10 min", "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [] - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 55 - }, - "id": 10, - "options": { - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "pieType": "pie", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.5.1", - "targets": [ - { - "disableTextWrap": false, - "editorMode": "builder", - "expr": "statusgo_waku_raw_message_sent_total", - "fullMetaSearch": false, - "includeNullMetadata": true, - "legendFormat": "{{message_type}}", - "range": true, - "refId": "A", - "useBackend": false - } - ], - "title": "Total Raw Message by Type", - "type": "piechart" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 63 - }, - "id": 11, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.5.1", - "targets": [ - { - "disableTextWrap": false, - "editorMode": "builder", - "expr": "rate(statusgo_waku_raw_message_size_bytes[10m])", - "fullMetaSearch": false, - "includeNullMetadata": false, - "legendFormat": "{{message_type}}", - "range": true, - "refId": "A", - "useBackend": false - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "disableTextWrap": false, - "editorMode": "builder", - "expr": "sum(rate(statusgo_waku_raw_message_size_bytes[10m]))", - "fullMetaSearch": false, - "hide": false, - "includeNullMetadata": true, - "instant": false, - "legendFormat": "Total", - "range": true, - "refId": "B", - "useBackend": false - } - ], - "title": "Rate of Bytes for Raw Message by Type", - "type": "timeseries" } ], "preload": false, From ee5139f79f6bf621e745cb5cb1d471a6ed4c2d8e Mon Sep 17 00:00:00 2001 From: kaichaosun Date: Tue, 11 Mar 2025 16:52:02 +0800 Subject: [PATCH 2/2] chore: fix duplicated message type --- grafana/provisioning/dashboards/status-go.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grafana/provisioning/dashboards/status-go.json b/grafana/provisioning/dashboards/status-go.json index 02258f6..ff2cc84 100644 --- a/grafana/provisioning/dashboards/status-go.json +++ b/grafana/provisioning/dashboards/status-go.json @@ -1240,7 +1240,7 @@ }, "tooltip": { "hideZeros": false, - "mode": "single", + "mode": "multi", "sort": "none" } }, @@ -1249,7 +1249,7 @@ { "disableTextWrap": false, "editorMode": "code", - "expr": "rate(statusgo_waku_raw_message_size_bytes[10m])", + "expr": "sum by (message_type) (rate(statusgo_waku_raw_message_size_bytes[10m])) ", "fullMetaSearch": false, "includeNullMetadata": false, "legendFormat": "{{message_type}}",