diff --git a/ADVANCED.md b/ADVANCED.md index fc94598..71e8e68 100644 --- a/ADVANCED.md +++ b/ADVANCED.md @@ -14,6 +14,7 @@ There are multiple environment variables you can configure to modify behaviour o * `RLN_RELAY_CRED_PATH` - path for peristing rln-relay credential * `RLN_RELAY_CRED_PASSWORD` - password for encrypting RLN credentials * `EXTRA_ARGS` - this variable allows you to specify additional or overriding CLI option for the Waku node which will be appended to the `wakunode2` command. (e.g. `EXTRA_ARGS="--store=false --max-connections=3000`) +* `CERTS_DIR` - allows you to define a path where SSL certificates are/will be stored. It needs to follow the directory structure produced by Certbot in `/etc/letsencrypt` ## Log monitoring and troubleshooting diff --git a/docker-compose.yml b/docker-compose.yml index 7facbc8..81c8e71 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -47,7 +47,7 @@ services: environment: DOMAIN: ${DOMAIN} NODEKEY: ${NODEKEY} - KEYSTORE_PASSWORD: "${KEYSTORE_PASSWORD}" + RLN_RELAY_CRED_PASSWORD: "${RLN_RELAY_CRED_PASSWORD}" ETH_CLIENT_ADDRESS: *eth_client_address EXTRA_ARGS: ${EXTRA_ARGS} <<: @@ -55,9 +55,9 @@ services: - *rln_env volumes: - ./run_node.sh:/opt/run_node.sh:Z - - ./certs:/etc/letsencrypt/:Z + - ${CERTS_DIR:-./certs}:/etc/letsencrypt/:Z - ./rln_tree:/etc/rln_tree/:Z - - ./keystore/keystore.json:/keystore/keystore.json/:Z + - ./keystore/keystore.json:/keystore/keystore.json:Z entrypoint: sh command: - /opt/run_node.sh diff --git a/monitoring/configuration/dashboards/nwaku-monitoring.json b/monitoring/configuration/dashboards/nwaku-monitoring.json index facc50d..77c6063 100644 --- a/monitoring/configuration/dashboards/nwaku-monitoring.json +++ b/monitoring/configuration/dashboards/nwaku-monitoring.json @@ -86,7 +86,7 @@ "showUnfilled": true, "valueMode": "color" }, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "targets": [ { "datasource": { @@ -153,9 +153,10 @@ "fields": "", "values": false }, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "targets": [ { "datasource": { @@ -215,9 +216,10 @@ "fields": "", "values": false }, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "targets": [ { "datasource": { @@ -281,9 +283,10 @@ "fields": "", "values": false }, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "targets": [ { "datasource": { @@ -542,7 +545,7 @@ }, "showHeader": true }, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "targets": [ { "datasource": { @@ -620,9 +623,10 @@ "fields": "", "values": false }, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "targets": [ { "datasource": { @@ -697,9 +701,10 @@ "fields": "", "values": false }, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "targets": [ { "datasource": { @@ -762,9 +767,10 @@ "fields": "", "values": false }, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "targets": [ { "datasource": { @@ -840,9 +846,10 @@ "fields": "", "values": false }, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "targets": [ { "datasource": { @@ -905,9 +912,10 @@ "fields": "", "values": false }, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "targets": [ { "datasource": { @@ -967,9 +975,10 @@ "fields": "", "values": false }, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "targets": [ { "datasource": { @@ -1032,9 +1041,10 @@ "fields": "", "values": false }, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "targets": [ { "datasource": { @@ -1094,9 +1104,10 @@ "fields": "", "values": false }, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "targets": [ { "datasource": { @@ -2579,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": [], @@ -2624,7 +3031,7 @@ "h": 3, "w": 4, "x": 0, - "y": 67 + "y": 78 }, "id": 11, "links": [], @@ -2653,9 +3060,10 @@ "fields": "", "values": false }, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -2735,7 +3143,7 @@ "h": 3, "w": 4, "x": 4, - "y": 67 + "y": 78 }, "id": 84, "links": [], @@ -2764,9 +3172,10 @@ "fields": "", "values": false }, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -2847,7 +3256,7 @@ "h": 3, "w": 4, "x": 8, - "y": 67 + "y": 78 }, "id": 23, "links": [], @@ -2876,9 +3285,10 @@ "fields": "", "values": false }, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -2916,6 +3326,20 @@ ], "valueName": "current" }, + { + "gridPos": { + "h": 6, + "w": 3, + "x": 12, + "y": 78 + }, + "id": 140, + "libraryPanel": { + "name": "Rows in message table (Postgres)", + "uid": "e2941e53-8bdf-4e44-8a14-8cca6476c269" + }, + "title": "Rows in message table (Postgres)" + }, { "datasource": "Prometheus", "description": "Shared buffer hits vs reads from disc", @@ -2956,9 +3380,9 @@ }, "gridPos": { "h": 6, - "w": 4, - "x": 12, - "y": 67 + "w": 3, + "x": 15, + "y": 78 }, "id": 16, "links": [], @@ -2976,7 +3400,7 @@ "showThresholdLabels": false, "showThresholdMarkers": true }, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "targets": [ { "expr": "sum(pg_stat_database_blks_hit{instance=~\"$Instance\"})/(sum(pg_stat_database_blks_hit{instance=~\"$Instance\"})+sum(pg_stat_database_blks_read{instance=~\"$Instance\"}))*100", @@ -3026,9 +3450,9 @@ }, "gridPos": { "h": 6, - "w": 4, - "x": 16, - "y": 67 + "w": 3, + "x": 18, + "y": 78 }, "id": 9, "links": [], @@ -3046,7 +3470,7 @@ "showThresholdLabels": false, "showThresholdMarkers": true }, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "targets": [ { "expr": "sum(pg_stat_database_numbackends)/max(pg_settings_max_connections)", @@ -3096,9 +3520,9 @@ }, "gridPos": { "h": 6, - "w": 4, - "x": 20, - "y": 67 + "w": 3, + "x": 21, + "y": 78 }, "id": 15, "links": [], @@ -3116,7 +3540,7 @@ "showThresholdLabels": false, "showThresholdMarkers": true }, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "targets": [ { "expr": "sum(pg_stat_database_xact_commit{instance=\"$Instance\"})/(sum(pg_stat_database_xact_commit{instance=\"$Instance\"}) + sum(pg_stat_database_xact_rollback{instance=\"$Instance\"}))", @@ -3165,7 +3589,7 @@ "h": 3, "w": 4, "x": 0, - "y": 70 + "y": 81 }, "id": 37, "links": [], @@ -3194,9 +3618,10 @@ "fields": "", "values": false }, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -3275,7 +3700,7 @@ "h": 3, "w": 4, "x": 4, - "y": 70 + "y": 81 }, "id": 14, "interval": "", @@ -3305,9 +3730,10 @@ "fields": "", "values": false }, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -3388,7 +3814,7 @@ "h": 3, "w": 4, "x": 8, - "y": 70 + "y": 81 }, "id": 93, "links": [], @@ -3417,9 +3843,10 @@ "fields": "", "values": false }, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -3487,7 +3914,7 @@ "h": 5, "w": 3, "x": 0, - "y": 73 + "y": 84 }, "id": 125, "options": { @@ -3502,9 +3929,10 @@ "fields": "", "values": false }, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "targets": [ { "datasource": { @@ -3562,7 +3990,7 @@ "h": 3, "w": 4, "x": 8, - "y": 73 + "y": 84 }, "id": 102, "links": [], @@ -3591,9 +4019,10 @@ "fields": "", "values": false }, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -3633,6 +4062,338 @@ ], "valueName": "current" }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 51, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 6, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 84 + }, + "id": 142, + "options": { + "legend": { + "calcs": [ + "last", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "pg_stat_user_tables_n_live_tup{datname=\"postgres\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "Live", + "range": true, + "refId": "A", + "useBackend": false + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "pg_stat_user_tables_n_dead_tup", + "fullMetaSearch": false, + "hide": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "Dead", + "range": true, + "refId": "B", + "useBackend": false + } + ], + "title": "Estimated number of rows (Postgres)", + "type": "timeseries" + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "decimals": 0, + "description": "View: pg_stat_activity", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 89 + }, + "hiddenSeries": false, + "id": 24, + "interval": "$Interval", + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [ + { + "targetBlank": true, + "title": "PostgreSQL Documentation", + "url": "https://www.postgresql.org/docs/current/monitoring-stats.html" + } + ], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.2.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum by (state) (pg_stat_activity_count{instance=\"$Instance\"})", + "legendFormat": "{{state}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Connections by state (stacked) (Postgres)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 0, + "format": "short", + "logBase": 1, + "show": true + }, + { + "decimals": 0, + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 92 + }, + "id": 141, + "libraryPanel": { + "name": "Database Size (Postgres)", + "uid": "eedb4531-abdb-4c30-92f6-6545c862a1f5" + }, + "title": "Database Size (Postgres)" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "decimals": 2, + "description": "1 Minute rate of transactions committed or rollback.", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 98 + }, + "hiddenSeries": false, + "id": 122, + "interval": "", + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.2.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum ((rate(pg_stat_database_xact_commit[$Interval])))", + "interval": "", + "legendFormat": "committed", + "refId": "A" + }, + { + "expr": "sum ((rate(pg_stat_database_xact_rollback[$Interval])))", + "hide": false, + "interval": "", + "legendFormat": "rollback", + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Transactions (Postgres)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, { "aliasColors": {}, "bars": true, @@ -3653,7 +4414,7 @@ "h": 9, "w": 12, "x": 12, - "y": 73 + "y": 100 }, "hiddenSeries": false, "id": 121, @@ -3685,7 +4446,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "pointradius": 2, "points": false, "renderer": "flot", @@ -3734,12 +4495,11 @@ }, { "aliasColors": {}, - "bars": true, + "bars": false, "dashLength": 10, "dashes": false, "datasource": "Prometheus", - "decimals": 0, - "description": "View: pg_stat_activity", + "description": "* blk_read_time: Time spent reading data file blocks by backends in this database, in milliseconds\n* blk_write_time: Time spent writing data file blocks by backends in this database, in milliseconds\n\ntrack_io_timings needs to be activated", "fieldConfig": { "defaults": { "links": [] @@ -3752,56 +4512,52 @@ "h": 9, "w": 12, "x": 0, - "y": 78 + "y": 107 }, "hiddenSeries": false, - "id": 24, - "interval": "$Interval", + "id": 26, "legend": { "alignAsTable": true, "avg": true, "current": true, - "hideEmpty": true, - "hideZero": true, "max": true, "min": false, - "rightSide": false, "show": true, "total": false, "values": true }, - "lines": false, + "lines": true, "linewidth": 1, - "links": [ - { - "targetBlank": true, - "title": "PostgreSQL Documentation", - "url": "https://www.postgresql.org/docs/current/monitoring-stats.html" - } - ], - "nullPointMode": "null as zero", + "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "stack": true, + "stack": false, "steppedLine": false, "targets": [ { - "expr": "sum by (state) (pg_stat_activity_count{instance=\"$Instance\"})", - "legendFormat": "{{state}}", + "expr": "sum ((rate(pg_stat_database_blk_read_time{instance=\"$Instance\"}[$Interval])))", + "interval": "", + "legendFormat": "blk_read_time", "refId": "A" + }, + { + "expr": "sum ((rate(pg_stat_database_blk_write_time{instance=\"$Instance\"}[$Interval])))", + "interval": "", + "legendFormat": "blk_read_time", + "refId": "B" } ], "thresholds": [], "timeRegions": [], - "title": "Connections by state (stacked) (Postgres)", + "title": "I/O Read/Write time (Postgres)", "tooltip": { "shared": true, "sort": 0, @@ -3815,15 +4571,15 @@ }, "yaxes": [ { - "decimals": 0, - "format": "short", + "format": "ms", "logBase": 1, + "min": "0", "show": true }, { - "decimals": 0, "format": "short", "logBase": 1, + "min": "0", "show": true } ], @@ -3850,7 +4606,7 @@ "h": 9, "w": 12, "x": 12, - "y": 82 + "y": 109 }, "hiddenSeries": false, "id": 27, @@ -3872,7 +4628,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "pointradius": 2, "points": false, "renderer": "flot", @@ -3938,8 +4694,7 @@ "dashLength": 10, "dashes": false, "datasource": "Prometheus", - "decimals": 2, - "description": "1 Minute rate of transactions committed or rollback.", + "description": "Source: pg_locks", "fieldConfig": { "defaults": { "links": [] @@ -3949,35 +4704,37 @@ "fill": 1, "fillGradient": 0, "gridPos": { - "h": 9, + "h": 10, "w": 12, "x": 0, - "y": 87 + "y": 116 }, "hiddenSeries": false, - "id": 122, - "interval": "", + "id": 123, "legend": { "alignAsTable": true, "avg": true, "current": true, - "hideEmpty": false, - "hideZero": false, "max": true, "min": false, - "rightSide": false, "show": true, "total": false, "values": true }, "lines": true, "linewidth": 1, + "links": [ + { + "title": "PostgreSQL Lock Modes", + "url": "https://www.postgresql.org/docs/12/explicit-locking.html#LOCKING-TABLES" + } + ], "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "pointradius": 2, "points": false, "renderer": "flot", @@ -3987,22 +4744,14 @@ "steppedLine": false, "targets": [ { - "expr": "sum ((rate(pg_stat_database_xact_commit[$Interval])))", - "interval": "", - "legendFormat": "committed", + "expr": "sum by (mode) (pg_locks_count{instance=\"$Instance\"})", + "legendFormat": "{{mode}}", "refId": "A" - }, - { - "expr": "sum ((rate(pg_stat_database_xact_rollback[$Interval])))", - "hide": false, - "interval": "", - "legendFormat": "rollback", - "refId": "B" } ], "thresholds": [], "timeRegions": [], - "title": "Transactions (Postgres)", + "title": "Locks by state (Postgres)", "tooltip": { "shared": true, "sort": 0, @@ -4016,7 +4765,7 @@ }, "yaxes": [ { - "format": "short", + "format": "none", "logBase": 1, "show": true }, @@ -4049,7 +4798,7 @@ "h": 9, "w": 12, "x": 12, - "y": 91 + "y": 118 }, "hiddenSeries": false, "id": 111, @@ -4071,7 +4820,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "pointradius": 2, "points": false, "renderer": "flot", @@ -4131,7 +4880,7 @@ "dashLength": 10, "dashes": false, "datasource": "Prometheus", - "description": "* blk_read_time: Time spent reading data file blocks by backends in this database, in milliseconds\n* blk_write_time: Time spent writing data file blocks by backends in this database, in milliseconds\n\ntrack_io_timings needs to be activated", + "description": "Lag behind master in seconds.\n\nOnly available on a standby System.", "fieldConfig": { "defaults": { "links": [] @@ -4141,13 +4890,14 @@ "fill": 1, "fillGradient": 0, "gridPos": { - "h": 9, + "h": 10, "w": 12, "x": 0, - "y": 96 + "y": 126 }, "hiddenSeries": false, - "id": 26, + "id": 120, + "interval": "1m", "legend": { "alignAsTable": true, "avg": true, @@ -4160,12 +4910,13 @@ }, "lines": true, "linewidth": 1, + "links": [], "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "pointradius": 2, "points": false, "renderer": "flot", @@ -4175,21 +4926,16 @@ "steppedLine": false, "targets": [ { - "expr": "sum ((rate(pg_stat_database_blk_read_time{instance=\"$Instance\"}[$Interval])))", - "interval": "", - "legendFormat": "blk_read_time", + "expr": "max(pg_replication_lag{instance=\"$Instance\"})", + "instant": false, + "intervalFactor": 1, + "legendFormat": "lag ", "refId": "A" - }, - { - "expr": "sum ((rate(pg_stat_database_blk_write_time{instance=\"$Instance\"}[$Interval])))", - "interval": "", - "legendFormat": "blk_read_time", - "refId": "B" } ], "thresholds": [], "timeRegions": [], - "title": "I/O Read/Write time (Postgres)", + "title": "Replication lag (Postgres)", "tooltip": { "shared": true, "sort": 0, @@ -4203,7 +4949,7 @@ }, "yaxes": [ { - "format": "ms", + "format": "s", "logBase": 1, "min": "0", "show": true @@ -4238,7 +4984,7 @@ "h": 5, "w": 12, "x": 12, - "y": 100 + "y": 127 }, "hiddenSeries": false, "id": 30, @@ -4267,7 +5013,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "pointradius": 2, "points": false, "renderer": "flot", @@ -4315,97 +5061,6 @@ "align": false } }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "description": "Source: pg_locks", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 10, - "w": 12, - "x": 0, - "y": 105 - }, - "hiddenSeries": false, - "id": 123, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [ - { - "title": "PostgreSQL Lock Modes", - "url": "https://www.postgresql.org/docs/12/explicit-locking.html#LOCKING-TABLES" - } - ], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "10.2.0", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (mode) (pg_locks_count{instance=\"$Instance\"})", - "legendFormat": "{{mode}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Locks by state (Postgres)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "none", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, { "aliasColors": {}, "bars": false, @@ -4425,7 +5080,7 @@ "h": 5, "w": 12, "x": 12, - "y": 105 + "y": 132 }, "hiddenSeries": false, "id": 31, @@ -4454,7 +5109,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "10.2.0", + "pluginVersion": "10.2.2", "pointradius": 2, "points": false, "renderer": "flot", @@ -4501,100 +5156,9 @@ "yaxis": { "align": false } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "description": "Lag behind master in seconds.\n\nOnly available on a standby System.", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 10, - "w": 12, - "x": 0, - "y": 115 - }, - "hiddenSeries": false, - "id": 120, - "interval": "1m", - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "10.2.0", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "max(pg_replication_lag{instance=\"$Instance\"})", - "instant": false, - "intervalFactor": 1, - "legendFormat": "lag ", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Replication lag (Postgres)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } } ], - "refresh": "", + "refresh": "auto", "revision": 1, "schemaVersion": 38, "tags": [], @@ -4660,14 +5224,14 @@ "auto_min": "10s", "current": { "selected": false, - "text": "auto", - "value": "$__auto_interval_Interval" + "text": "10m", + "value": "10m" }, "hide": 0, "name": "Interval", "options": [ { - "selected": true, + "selected": false, "text": "auto", "value": "$__auto_interval_Interval" }, @@ -4682,7 +5246,7 @@ "value": "1m" }, { - "selected": false, + "selected": true, "text": "10m", "value": "10m" }, @@ -4721,8 +5285,8 @@ ] }, "time": { - "from": "now-5m", - "to": "now" + "from": "2023-12-27T02:18:33.155Z", + "to": "2023-12-27T04:18:33.159Z" }, "timepicker": { "refresh_intervals": [ @@ -4740,4 +5304,4 @@ "uid": "yns_4vFVk", "version": 1, "weekStart": "" -} +} \ No newline at end of file diff --git a/register_rln.sh b/register_rln.sh index 6d8de78..e5d39cd 100755 --- a/register_rln.sh +++ b/register_rln.sh @@ -24,5 +24,5 @@ docker run -v $(pwd)/keystore:/keystore/:Z wakuorg/nwaku:v0.21.3 generateRlnKeys --rln-relay-eth-private-key=${ETH_TESTNET_KEY} \ --rln-relay-eth-contract-address=0xF471d71E9b1455bBF4b85d475afb9BB0954A29c4 \ --rln-relay-cred-path=/keystore/keystore.json \ ---rln-relay-cred-password="'"${RLN_RELAY_CRED_PASSWORD}"'" \ +--rln-relay-cred-password="${RLN_RELAY_CRED_PASSWORD}" \ --execute diff --git a/run_node.sh b/run_node.sh index fd59779..1ca9250 100644 --- a/run_node.sh +++ b/run_node.sh @@ -51,7 +51,7 @@ RLN_RELAY_CRED_PATH=--rln-relay-cred-path=${RLN_RELAY_CRED_PATH:-/keystore/keyst if [ -n "${RLN_RELAY_CRED_PASSWORD}" ]; then - RLN_RELAY_CRED_PASSWORD=--rln-relay-cred-password="'"${RLN_RELAY_CRED_PASSWORD}"'" + RLN_RELAY_CRED_PASSWORD=--rln-relay-cred-password="${RLN_RELAY_CRED_PASSWORD}" fi exec /usr/bin/wakunode\ @@ -84,6 +84,7 @@ exec /usr/bin/wakunode\ --metrics-server-port=8003\ --metrics-server-address=0.0.0.0\ --rest=true\ + --rest-admin=true\ --rest-address=0.0.0.0\ --rest-port=8645\ --nat=extip:"${MY_EXT_IP}"\