diff --git a/monitoring/configuration/dashboards/nwaku-monitoring.json b/monitoring/configuration/dashboards/nwaku-monitoring.json index 5e79ab7..e2fafbd 100644 --- a/monitoring/configuration/dashboards/nwaku-monitoring.json +++ b/monitoring/configuration/dashboards/nwaku-monitoring.json @@ -2590,13 +2590,409 @@ "title": "RLN Invalid Messages", "type": "timeseries" }, + { + "datasource": { + "type": "postgres", + "uid": "e5d2e0c2-371d-4178-ac71-edc122fb459c" + }, + "description": "Number of messages in local database per shard.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [ + { + "options": { + "/waku/2/rs/1/0": { + "index": 0, + "text": "0" + }, + "/waku/2/rs/1/1": { + "index": 1, + "text": "1" + }, + "/waku/2/rs/1/2": { + "index": 2, + "text": "2" + }, + "/waku/2/rs/1/3": { + "index": 3, + "text": "3" + }, + "/waku/2/rs/1/4": { + "index": 4, + "text": "4" + }, + "/waku/2/rs/1/5": { + "index": 5, + "text": "5" + }, + "/waku/2/rs/1/6": { + "index": 6, + "text": "6" + }, + "/waku/2/rs/1/7": { + "index": 7, + "text": "7" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Total Payload Size" + }, + "properties": [ + { + "id": "unit", + "value": "decbytes" + } + ] + } + ] + }, + "gridPos": { + "h": 11, + "w": 9, + "x": 0, + "y": 66 + }, + "id": 143, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "frameIndex": 1, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "e5d2e0c2-371d-4178-ac71-edc122fb459c" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT pubsubtopic, COUNT(id), sum(pg_column_size(payload))\nFROM messages\nGROUP BY pubsubtopic", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "pubsubtopic", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "name": "pubsubtopic", + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "messages" + } + ], + "title": "Stored Message by Shard", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": {}, + "renameByName": { + "Shard": "", + "count": "Number of Stored Messages", + "pubsubtopic": "Shard", + "sum": "Total Payload Size" + } + } + }, + { + "id": "sortBy", + "options": { + "fields": {}, + "sort": [ + { + "field": "Shard" + } + ] + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "postgres", + "uid": "e5d2e0c2-371d-4178-ac71-edc122fb459c" + }, + "description": "Messages in local database per app name, as extracted from the content topic.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [ + { + "options": { + "/waku/2/rs/1/0": { + "index": 0, + "text": "0" + }, + "/waku/2/rs/1/1": { + "index": 1, + "text": "1" + }, + "/waku/2/rs/1/2": { + "index": 2, + "text": "2" + }, + "/waku/2/rs/1/3": { + "index": 3, + "text": "3" + }, + "/waku/2/rs/1/4": { + "index": 4, + "text": "4" + }, + "/waku/2/rs/1/5": { + "index": 5, + "text": "5" + }, + "/waku/2/rs/1/6": { + "index": 6, + "text": "6" + }, + "/waku/2/rs/1/7": { + "index": 7, + "text": "7" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "string" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Number of Messages (sum)" + }, + "properties": [ + { + "id": "unit", + "value": "none" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Total Payload Size (sum)" + }, + "properties": [ + { + "id": "unit", + "value": "decbytes" + } + ] + } + ] + }, + "gridPos": { + "h": 11, + "w": 9, + "x": 9, + "y": 66 + }, + "id": 144, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "frameIndex": 1, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "e5d2e0c2-371d-4178-ac71-edc122fb459c" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT REGEXP_REPLACE(contenttopic,'^\\/(.+)\\/(\\d+)\\/(.+)\\/(.+)$','\\1') as \"App name\", COUNT(id), pg_column_size(payload)\nFROM messages\nGROUP BY contenttopic, payload", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "pubsubtopic", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "name": "pubsubtopic", + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "messages" + } + ], + "title": "Stored Message by Content Topic App Name", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": {}, + "renameByName": { + "contenttopic": "App name", + "count": "Number of Messages", + "pg_column_size": "Total Payload Size" + } + } + }, + { + "id": "groupBy", + "options": { + "fields": { + "App name": { + "aggregations": [ + "uniqueValues" + ], + "operation": "groupby" + }, + "Number of Messages": { + "aggregations": [ + "sum" + ], + "operation": "aggregate" + }, + "Total Payload Size": { + "aggregations": [ + "sum" + ], + "operation": "aggregate" + }, + "pg_column_size": { + "aggregations": [ + "sum" + ], + "operation": "aggregate" + } + } + } + }, + { + "id": "sortBy", + "options": { + "fields": {}, + "sort": [ + { + "desc": true, + "field": "Number of Messages (sum)" + } + ] + } + } + ], + "type": "table" + }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 66 + "y": 77 }, "id": 46, "panels": [], @@ -2635,7 +3031,7 @@ "h": 3, "w": 4, "x": 0, - "y": 67 + "y": 78 }, "id": 11, "links": [], @@ -2747,7 +3143,7 @@ "h": 3, "w": 4, "x": 4, - "y": 67 + "y": 78 }, "id": 84, "links": [], @@ -2860,7 +3256,7 @@ "h": 3, "w": 4, "x": 8, - "y": 67 + "y": 78 }, "id": 23, "links": [], @@ -2935,7 +3331,7 @@ "h": 6, "w": 3, "x": 12, - "y": 67 + "y": 78 }, "id": 140, "libraryPanel": { @@ -2986,7 +3382,7 @@ "h": 6, "w": 3, "x": 15, - "y": 67 + "y": 78 }, "id": 16, "links": [], @@ -3056,7 +3452,7 @@ "h": 6, "w": 3, "x": 18, - "y": 67 + "y": 78 }, "id": 9, "links": [], @@ -3126,7 +3522,7 @@ "h": 6, "w": 3, "x": 21, - "y": 67 + "y": 78 }, "id": 15, "links": [], @@ -3193,7 +3589,7 @@ "h": 3, "w": 4, "x": 0, - "y": 70 + "y": 81 }, "id": 37, "links": [], @@ -3304,7 +3700,7 @@ "h": 3, "w": 4, "x": 4, - "y": 70 + "y": 81 }, "id": 14, "interval": "", @@ -3418,7 +3814,7 @@ "h": 3, "w": 4, "x": 8, - "y": 70 + "y": 81 }, "id": 93, "links": [], @@ -3518,7 +3914,7 @@ "h": 5, "w": 3, "x": 0, - "y": 73 + "y": 84 }, "id": 125, "options": { @@ -3594,7 +3990,7 @@ "h": 3, "w": 4, "x": 8, - "y": 73 + "y": 84 }, "id": 102, "links": [], @@ -3731,7 +4127,7 @@ "h": 8, "w": 12, "x": 12, - "y": 73 + "y": 84 }, "id": 142, "options": { @@ -3807,7 +4203,7 @@ "h": 9, "w": 12, "x": 0, - "y": 78 + "y": 89 }, "hiddenSeries": false, "id": 24, @@ -3891,7 +4287,7 @@ "h": 8, "w": 12, "x": 12, - "y": 81 + "y": 92 }, "id": 141, "libraryPanel": { @@ -3920,7 +4316,7 @@ "h": 9, "w": 12, "x": 0, - "y": 87 + "y": 98 }, "hiddenSeries": false, "id": 122, @@ -4018,7 +4414,7 @@ "h": 9, "w": 12, "x": 12, - "y": 89 + "y": 100 }, "hiddenSeries": false, "id": 121, @@ -4116,7 +4512,7 @@ "h": 9, "w": 12, "x": 0, - "y": 96 + "y": 107 }, "hiddenSeries": false, "id": 26, @@ -4210,7 +4606,7 @@ "h": 9, "w": 12, "x": 12, - "y": 98 + "y": 109 }, "hiddenSeries": false, "id": 27, @@ -4311,7 +4707,7 @@ "h": 10, "w": 12, "x": 0, - "y": 105 + "y": 116 }, "hiddenSeries": false, "id": 123, @@ -4402,7 +4798,7 @@ "h": 9, "w": 12, "x": 12, - "y": 107 + "y": 118 }, "hiddenSeries": false, "id": 111, @@ -4497,7 +4893,7 @@ "h": 10, "w": 12, "x": 0, - "y": 115 + "y": 126 }, "hiddenSeries": false, "id": 120, @@ -4588,7 +4984,7 @@ "h": 5, "w": 12, "x": 12, - "y": 116 + "y": 127 }, "hiddenSeries": false, "id": 30, @@ -4684,7 +5080,7 @@ "h": 5, "w": 12, "x": 12, - "y": 121 + "y": 132 }, "hiddenSeries": false, "id": 31, @@ -4762,7 +5158,7 @@ } } ], - "refresh": "5m", + "refresh": false, "revision": 1, "schemaVersion": 38, "tags": [], @@ -4827,15 +5223,15 @@ "auto_count": 30, "auto_min": "10s", "current": { - "selected": false, - "text": "auto", - "value": "$__auto_interval_Interval" + "selected": true, + "text": "10m", + "value": "10m" }, "hide": 0, "name": "Interval", "options": [ { - "selected": true, + "selected": false, "text": "auto", "value": "$__auto_interval_Interval" }, @@ -4850,7 +5246,7 @@ "value": "1m" }, { - "selected": false, + "selected": true, "text": "10m", "value": "10m" }, @@ -4889,8 +5285,8 @@ ] }, "time": { - "from": "now-1h", - "to": "now" + "from": "2023-12-27T02:18:33.155Z", + "to": "2023-12-27T04:18:33.159Z" }, "timepicker": { "refresh_intervals": [