From 7b98331727eb2a39706d0eeb38e396f4e7bf632c Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Thu, 6 Jun 2024 18:33:09 +0530 Subject: [PATCH 01/11] Update sushiswap watcher config template --- .../watcher-config-template.toml | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/stack_orchestrator/data/config/watcher-sushiswap-v3/watcher-config-template.toml b/stack_orchestrator/data/config/watcher-sushiswap-v3/watcher-config-template.toml index bbc19c26..2fd25727 100644 --- a/stack_orchestrator/data/config/watcher-sushiswap-v3/watcher-config-template.toml +++ b/stack_orchestrator/data/config/watcher-sushiswap-v3/watcher-config-template.toml @@ -2,7 +2,6 @@ host = "0.0.0.0" port = 3008 kind = "active" - gqlPath = "/" # Checkpointing state. checkpointing = true @@ -22,23 +21,30 @@ # Interval in number of blocks at which to clear entities cache. clearEntitiesCacheInterval = 1000 - # Max block range for which to return events in eventsInRange GQL query. - # Use -1 for skipping check on block range. - maxEventsBlockRange = 1000 - # Flag to specify whether RPC endpoint supports block hash as block tag parameter rpcSupportsBlockHashParam = false - # GQL cache settings - [server.gqlCache] - enabled = true + # Server GQL config + [server.gql] + path = "/" - # Max in-memory cache size (in bytes) (default 8 MB) - # maxCacheSize + # Max block range for which to return events in eventsInRange GQL query. + # Use -1 for skipping check on block range. + maxEventsBlockRange = 1000 - # GQL cache-control max-age settings (in seconds) - maxAge = 15 - timeTravelMaxAge = 86400 # 1 day + # Log directory for GQL requests + logDir = "./gql-logs" + + # GQL cache settings + [server.gql.cache] + enabled = true + + # Max in-memory cache size (in bytes) (default 8 MB) + # maxCacheSize + + # GQL cache-control max-age settings (in seconds) + maxAge = 15 + timeTravelMaxAge = 86400 # 1 day [metrics] host = "0.0.0.0" -- 2.45.2 From be02c71b7c46fdc798280e98509be7fd5ec39d8d Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Thu, 6 Jun 2024 19:26:15 +0530 Subject: [PATCH 02/11] Update ajna watcher config template --- .../watcher-ajna/watcher-config-template.toml | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/stack_orchestrator/data/config/watcher-ajna/watcher-config-template.toml b/stack_orchestrator/data/config/watcher-ajna/watcher-config-template.toml index 8aca4e74..865f016b 100644 --- a/stack_orchestrator/data/config/watcher-ajna/watcher-config-template.toml +++ b/stack_orchestrator/data/config/watcher-ajna/watcher-config-template.toml @@ -2,7 +2,6 @@ host = "0.0.0.0" port = 3008 kind = "active" - gqlPath = "/" # Checkpointing state. checkpointing = true @@ -22,23 +21,30 @@ # Interval in number of blocks at which to clear entities cache. clearEntitiesCacheInterval = 1000 - # Max block range for which to return events in eventsInRange GQL query. - # Use -1 for skipping check on block range. - maxEventsBlockRange = 1000 - # Flag to specify whether RPC endpoint supports block hash as block tag parameter rpcSupportsBlockHashParam = false - # GQL cache settings - [server.gqlCache] - enabled = true + # Server GQL config + [server.gql] + path = "/" - # Max in-memory cache size (in bytes) (default 8 MB) - # maxCacheSize + # Max block range for which to return events in eventsInRange GQL query. + # Use -1 for skipping check on block range. + maxEventsBlockRange = 1000 - # GQL cache-control max-age settings (in seconds) - maxAge = 15 - timeTravelMaxAge = 86400 # 1 day + # Log directory for GQL requests + logDir = "./gql-logs" + + # GQL cache settings + [server.gql.cache] + enabled = true + + # Max in-memory cache size (in bytes) (default 8 MB) + # maxCacheSize + + # GQL cache-control max-age settings (in seconds) + maxAge = 15 + timeTravelMaxAge = 86400 # 1 day [metrics] host = "0.0.0.0" -- 2.45.2 From 99a74be1973cb012e2e5fa475ae722997535ecf9 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Fri, 7 Jun 2024 11:00:47 +0530 Subject: [PATCH 03/11] Update merkl-sushiswap-v3 watcher config template --- .../watcher-config-template.toml | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/stack_orchestrator/data/config/watcher-merkl-sushiswap-v3/watcher-config-template.toml b/stack_orchestrator/data/config/watcher-merkl-sushiswap-v3/watcher-config-template.toml index 33c7c22b..daa10b41 100644 --- a/stack_orchestrator/data/config/watcher-merkl-sushiswap-v3/watcher-config-template.toml +++ b/stack_orchestrator/data/config/watcher-merkl-sushiswap-v3/watcher-config-template.toml @@ -2,7 +2,6 @@ host = "0.0.0.0" port = 3008 kind = "active" - gqlPath = '/' # Checkpointing state. checkpointing = true @@ -22,23 +21,30 @@ # Interval in number of blocks at which to clear entities cache. clearEntitiesCacheInterval = 1000 - # Max block range for which to return events in eventsInRange GQL query. - # Use -1 for skipping check on block range. - maxEventsBlockRange = 1000 - # Flag to specify whether RPC endpoint supports block hash as block tag parameter rpcSupportsBlockHashParam = false - # GQL cache settings - [server.gqlCache] - enabled = true + # Server GQL config + [server.gql] + path = "/" - # Max in-memory cache size (in bytes) (default 8 MB) - # maxCacheSize + # Max block range for which to return events in eventsInRange GQL query. + # Use -1 for skipping check on block range. + maxEventsBlockRange = 1000 - # GQL cache-control max-age settings (in seconds) - maxAge = 15 - timeTravelMaxAge = 86400 # 1 day + # Log directory for GQL requests + logDir = "./gql-logs" + + # GQL cache settings + [server.gql.cache] + enabled = true + + # Max in-memory cache size (in bytes) (default 8 MB) + # maxCacheSize + + # GQL cache-control max-age settings (in seconds) + maxAge = 15 + timeTravelMaxAge = 86400 # 1 day [metrics] host = "0.0.0.0" -- 2.45.2 From a5142268aa04cd068e0599d74a37bc6a89e4ad19 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Fri, 7 Jun 2024 15:41:56 +0530 Subject: [PATCH 04/11] Update azimuth watchers config template --- .../data/config/watcher-azimuth/watcher-config-template.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stack_orchestrator/data/config/watcher-azimuth/watcher-config-template.toml b/stack_orchestrator/data/config/watcher-azimuth/watcher-config-template.toml index 6ddaa6f6..40b7f80c 100644 --- a/stack_orchestrator/data/config/watcher-azimuth/watcher-config-template.toml +++ b/stack_orchestrator/data/config/watcher-azimuth/watcher-config-template.toml @@ -1,6 +1,7 @@ [server] host = "0.0.0.0" - maxSimultaneousRequests = -1 + [server.gql] + maxSimultaneousRequests = -1 [metrics] host = "0.0.0.0" -- 2.45.2 From cd05d26895e0b03a5fb530aebf7665ef72b4138f Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Mon, 10 Jun 2024 10:01:46 +0530 Subject: [PATCH 05/11] Increase diff threshold for subgraph watcher alerts --- .../data/config/monitoring/watcher-alert-rules.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stack_orchestrator/data/config/monitoring/watcher-alert-rules.yml b/stack_orchestrator/data/config/monitoring/watcher-alert-rules.yml index e5710565..a1ee9002 100644 --- a/stack_orchestrator/data/config/monitoring/watcher-alert-rules.yml +++ b/stack_orchestrator/data/config/monitoring/watcher-alert-rules.yml @@ -684,7 +684,7 @@ groups: name: Expression type: __expr__ uid: __expr__ - expression: ${diff} >= 16 + expression: ${diff} >= 32 intervalMs: 1000 maxDataPoints: 43200 refId: condition @@ -760,7 +760,7 @@ groups: name: Expression type: __expr__ uid: __expr__ - expression: ${diff} >= 16 + expression: ${diff} >= 32 intervalMs: 1000 maxDataPoints: 43200 refId: condition @@ -838,7 +838,7 @@ groups: name: Expression type: __expr__ uid: __expr__ - expression: ${diff} >= 16 + expression: ${diff} >= 32 intervalMs: 1000 maxDataPoints: 43200 refId: condition -- 2.45.2 From c72cab736f08ccb1f4c586dec6a8fe0b25b1aafc Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Mon, 10 Jun 2024 10:18:42 +0530 Subject: [PATCH 06/11] Add a panel with latest processed block to watcher dashboard --- .../grafana/dashboards/watcher-dashboard.json | 89 ++++++++++++++++--- 1 file changed, 79 insertions(+), 10 deletions(-) diff --git a/stack_orchestrator/data/config/monitoring/grafana/dashboards/watcher-dashboard.json b/stack_orchestrator/data/config/monitoring/grafana/dashboards/watcher-dashboard.json index 5e8998cd..5e0303da 100644 --- a/stack_orchestrator/data/config/monitoring/grafana/dashboards/watcher-dashboard.json +++ b/stack_orchestrator/data/config/monitoring/grafana/dashboards/watcher-dashboard.json @@ -282,7 +282,7 @@ }, "gridPos": { "h": 3, - "w": 4, + "w": 3, "x": 0, "y": 4 }, @@ -303,6 +303,75 @@ "wideLayout": true }, "pluginVersion": "10.2.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "code", + "expr": "last_processed_block_number{job=~\"$job\", instance=~\"$watcher\"}", + "fullMetaSearch": false, + "hide": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "B", + "useBackend": false + } + ], + "title": "Latest processed block", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "shades" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 3, + "y": 4 + }, + "id": 38, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.2.3", "targets": [ { "datasource": { @@ -352,8 +421,8 @@ }, "gridPos": { "h": 3, - "w": 4, - "x": 4, + "w": 3, + "x": 6, "y": 4 }, "id": 11, @@ -421,8 +490,8 @@ }, "gridPos": { "h": 3, - "w": 4, - "x": 8, + "w": 3, + "x": 9, "y": 4 }, "id": 12, @@ -639,7 +708,7 @@ "uid": "PBFA97CFB590B2093" }, "editorMode": "code", - "expr": "sync_status_block_number{job=~\"$job\", instance=~\"$watcher\", kind=\"latest_indexed\"}", + "expr": "last_processed_block_number{job=~\"$job\", instance=~\"$watcher\"}", "hide": false, "instant": false, "legendFormat": "{{__name__}}", @@ -656,7 +725,7 @@ "binary": { "left": "latest_upstream_block_number", "operator": "-", - "right": "sync_status_block_number" + "right": "last_processed_block_number" }, "mode": "binary", "reduce": { @@ -750,7 +819,7 @@ "uid": "PBFA97CFB590B2093" }, "editorMode": "code", - "expr": "sync_status_block_number{job=~\"$job\", instance=~\"$watcher\", kind=\"latest_indexed\"}", + "expr": "last_processed_block_number{job=~\"$job\", instance=~\"$watcher\"}", "hide": false, "instant": false, "legendFormat": "{{__name__}}", @@ -767,7 +836,7 @@ "binary": { "left": "latest_block_number", "operator": "-", - "right": "sync_status_block_number" + "right": "last_processed_block_number" }, "mode": "binary", "reduce": { @@ -3215,6 +3284,6 @@ "timepicker": {}, "timezone": "", "title": "Watchers", - "version": 4, + "version": 5, "weekStart": "" } -- 2.45.2 From 31a0ab592ef39959a2a033bb4e185ef75d2f186d Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Mon, 10 Jun 2024 16:52:38 +0530 Subject: [PATCH 07/11] Update watcher config templates with blockProcessingOffset option --- .../data/config/watcher-ajna/watcher-config-template.toml | 3 +++ .../watcher-merkl-sushiswap-v3/watcher-config-template.toml | 3 +++ .../config/watcher-sushiswap-v3/watcher-config-template.toml | 3 +++ stack_orchestrator/data/stacks/ajna/stack.yml | 2 +- stack_orchestrator/data/stacks/azimuth/stack.yml | 2 +- stack_orchestrator/data/stacks/merkl-sushiswap-v3/stack.yml | 2 +- stack_orchestrator/data/stacks/sushiswap-v3/stack.yml | 2 +- 7 files changed, 13 insertions(+), 4 deletions(-) diff --git a/stack_orchestrator/data/config/watcher-ajna/watcher-config-template.toml b/stack_orchestrator/data/config/watcher-ajna/watcher-config-template.toml index 865f016b..b0e1e187 100644 --- a/stack_orchestrator/data/config/watcher-ajna/watcher-config-template.toml +++ b/stack_orchestrator/data/config/watcher-ajna/watcher-config-template.toml @@ -91,6 +91,9 @@ # Filecoin block time: https://docs.filecoin.io/basics/the-blockchain/blocks-and-tipsets#blocktime blockDelayInMilliSecs = 30000 + # Number of blocks by which block processing lags behind head + blockProcessingOffset = 16 + # Boolean to switch between modes of processing events when starting the server. # Setting to true will fetch filtered events and required blocks in a range of blocks and then process them. # Setting to false will fetch blocks consecutively with its events and then process them (Behaviour is followed in realtime processing near head). diff --git a/stack_orchestrator/data/config/watcher-merkl-sushiswap-v3/watcher-config-template.toml b/stack_orchestrator/data/config/watcher-merkl-sushiswap-v3/watcher-config-template.toml index daa10b41..fddf5eac 100644 --- a/stack_orchestrator/data/config/watcher-merkl-sushiswap-v3/watcher-config-template.toml +++ b/stack_orchestrator/data/config/watcher-merkl-sushiswap-v3/watcher-config-template.toml @@ -91,6 +91,9 @@ # Filecoin block time: https://docs.filecoin.io/basics/the-blockchain/blocks-and-tipsets#blocktime blockDelayInMilliSecs = 30000 + # Number of blocks by which block processing lags behind head + blockProcessingOffset = 16 + # Boolean to switch between modes of processing events when starting the server. # Setting to true will fetch filtered events and required blocks in a range of blocks and then process them. # Setting to false will fetch blocks consecutively with its events and then process them (Behaviour is followed in realtime processing near head). diff --git a/stack_orchestrator/data/config/watcher-sushiswap-v3/watcher-config-template.toml b/stack_orchestrator/data/config/watcher-sushiswap-v3/watcher-config-template.toml index 2fd25727..f5a380b5 100644 --- a/stack_orchestrator/data/config/watcher-sushiswap-v3/watcher-config-template.toml +++ b/stack_orchestrator/data/config/watcher-sushiswap-v3/watcher-config-template.toml @@ -91,6 +91,9 @@ # Filecoin block time: https://docs.filecoin.io/basics/the-blockchain/blocks-and-tipsets#blocktime blockDelayInMilliSecs = 30000 + # Number of blocks by which block processing lags behind head + blockProcessingOffset = 16 + # Boolean to switch between modes of processing events when starting the server. # Setting to true will fetch filtered events and required blocks in a range of blocks and then process them. # Setting to false will fetch blocks consecutively with its events and then process them (Behaviour is followed in realtime processing near head). diff --git a/stack_orchestrator/data/stacks/ajna/stack.yml b/stack_orchestrator/data/stacks/ajna/stack.yml index d5187984..c6ba0c04 100644 --- a/stack_orchestrator/data/stacks/ajna/stack.yml +++ b/stack_orchestrator/data/stacks/ajna/stack.yml @@ -2,7 +2,7 @@ version: "1.0" name: ajna description: "Ajna watcher stack" repos: - - git.vdb.to/cerc-io/ajna-watcher-ts@v0.1.12 + - git.vdb.to/cerc-io/ajna-watcher-ts@v0.1.13 containers: - cerc/watcher-ajna pods: diff --git a/stack_orchestrator/data/stacks/azimuth/stack.yml b/stack_orchestrator/data/stacks/azimuth/stack.yml index 8c942319..fe71d421 100644 --- a/stack_orchestrator/data/stacks/azimuth/stack.yml +++ b/stack_orchestrator/data/stacks/azimuth/stack.yml @@ -1,7 +1,7 @@ version: "1.0" name: azimuth repos: - - github.com/cerc-io/azimuth-watcher-ts@0.1.6 + - github.com/cerc-io/azimuth-watcher-ts@0.1.7 containers: - cerc/watcher-azimuth pods: diff --git a/stack_orchestrator/data/stacks/merkl-sushiswap-v3/stack.yml b/stack_orchestrator/data/stacks/merkl-sushiswap-v3/stack.yml index c22633fc..779cb2e6 100644 --- a/stack_orchestrator/data/stacks/merkl-sushiswap-v3/stack.yml +++ b/stack_orchestrator/data/stacks/merkl-sushiswap-v3/stack.yml @@ -2,7 +2,7 @@ version: "1.0" name: merkl-sushiswap-v3 description: "SushiSwap v3 watcher stack" repos: - - github.com/cerc-io/merkl-sushiswap-v3-watcher-ts@v0.1.13 + - github.com/cerc-io/merkl-sushiswap-v3-watcher-ts@v0.1.14 containers: - cerc/watcher-merkl-sushiswap-v3 pods: diff --git a/stack_orchestrator/data/stacks/sushiswap-v3/stack.yml b/stack_orchestrator/data/stacks/sushiswap-v3/stack.yml index 9e292847..ac29632b 100644 --- a/stack_orchestrator/data/stacks/sushiswap-v3/stack.yml +++ b/stack_orchestrator/data/stacks/sushiswap-v3/stack.yml @@ -2,7 +2,7 @@ version: "1.0" name: sushiswap-v3 description: "SushiSwap v3 watcher stack" repos: - - github.com/cerc-io/sushiswap-v3-watcher-ts@v0.1.13 + - github.com/cerc-io/sushiswap-v3-watcher-ts@v0.1.14 containers: - cerc/watcher-sushiswap-v3 pods: -- 2.45.2 From 6a78f1d2aa217753108a2602c8d68927b80e929a Mon Sep 17 00:00:00 2001 From: Nabarun Date: Tue, 11 Jun 2024 19:50:36 +0530 Subject: [PATCH 08/11] Set blockProcessingOffset to zero after eth_getLogs query using blockHash filter --- .../data/config/watcher-ajna/watcher-config-template.toml | 2 +- .../watcher-merkl-sushiswap-v3/watcher-config-template.toml | 2 +- .../config/watcher-sushiswap-v3/watcher-config-template.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stack_orchestrator/data/config/watcher-ajna/watcher-config-template.toml b/stack_orchestrator/data/config/watcher-ajna/watcher-config-template.toml index b0e1e187..daa5238d 100644 --- a/stack_orchestrator/data/config/watcher-ajna/watcher-config-template.toml +++ b/stack_orchestrator/data/config/watcher-ajna/watcher-config-template.toml @@ -92,7 +92,7 @@ blockDelayInMilliSecs = 30000 # Number of blocks by which block processing lags behind head - blockProcessingOffset = 16 + blockProcessingOffset = 0 # Boolean to switch between modes of processing events when starting the server. # Setting to true will fetch filtered events and required blocks in a range of blocks and then process them. diff --git a/stack_orchestrator/data/config/watcher-merkl-sushiswap-v3/watcher-config-template.toml b/stack_orchestrator/data/config/watcher-merkl-sushiswap-v3/watcher-config-template.toml index fddf5eac..035843ff 100644 --- a/stack_orchestrator/data/config/watcher-merkl-sushiswap-v3/watcher-config-template.toml +++ b/stack_orchestrator/data/config/watcher-merkl-sushiswap-v3/watcher-config-template.toml @@ -92,7 +92,7 @@ blockDelayInMilliSecs = 30000 # Number of blocks by which block processing lags behind head - blockProcessingOffset = 16 + blockProcessingOffset = 0 # Boolean to switch between modes of processing events when starting the server. # Setting to true will fetch filtered events and required blocks in a range of blocks and then process them. diff --git a/stack_orchestrator/data/config/watcher-sushiswap-v3/watcher-config-template.toml b/stack_orchestrator/data/config/watcher-sushiswap-v3/watcher-config-template.toml index f5a380b5..817d5323 100644 --- a/stack_orchestrator/data/config/watcher-sushiswap-v3/watcher-config-template.toml +++ b/stack_orchestrator/data/config/watcher-sushiswap-v3/watcher-config-template.toml @@ -92,7 +92,7 @@ blockDelayInMilliSecs = 30000 # Number of blocks by which block processing lags behind head - blockProcessingOffset = 16 + blockProcessingOffset = 0 # Boolean to switch between modes of processing events when starting the server. # Setting to true will fetch filtered events and required blocks in a range of blocks and then process them. -- 2.45.2 From a11034a8329aae411c4bde9860ab528999841c8f Mon Sep 17 00:00:00 2001 From: Nabarun Date: Wed, 12 Jun 2024 15:58:37 +0530 Subject: [PATCH 09/11] Mount GQL query log files on volumes --- .../data/compose/docker-compose-watcher-ajna.yml | 2 ++ .../compose/docker-compose-watcher-azimuth.yml | 16 ++++++++++++++++ ...docker-compose-watcher-merkl-sushiswap-v3.yml | 2 ++ .../docker-compose-watcher-sushiswap-v3.yml | 2 ++ stack_orchestrator/data/stacks/azimuth/stack.yml | 2 +- 5 files changed, 23 insertions(+), 1 deletion(-) diff --git a/stack_orchestrator/data/compose/docker-compose-watcher-ajna.yml b/stack_orchestrator/data/compose/docker-compose-watcher-ajna.yml index 42381498..84291ec4 100644 --- a/stack_orchestrator/data/compose/docker-compose-watcher-ajna.yml +++ b/stack_orchestrator/data/compose/docker-compose-watcher-ajna.yml @@ -60,6 +60,7 @@ services: volumes: - ../config/watcher-ajna/watcher-config-template.toml:/app/environments/watcher-config-template.toml - ../config/watcher-ajna/start-server.sh:/app/start-server.sh + - ajna_watcher_gql_logs_data:/app/gql-logs ports: - "3008" - "9001" @@ -74,3 +75,4 @@ services: volumes: ajna_watcher_db_data: + ajna_watcher_gql_logs_data: diff --git a/stack_orchestrator/data/compose/docker-compose-watcher-azimuth.yml b/stack_orchestrator/data/compose/docker-compose-watcher-azimuth.yml index 3809113f..5bbac851 100644 --- a/stack_orchestrator/data/compose/docker-compose-watcher-azimuth.yml +++ b/stack_orchestrator/data/compose/docker-compose-watcher-azimuth.yml @@ -74,6 +74,7 @@ services: - ../config/watcher-azimuth/watcher-config-template.toml:/app/packages/azimuth-watcher/environments/watcher-config-template.toml - ../config/watcher-azimuth/merge-toml.js:/app/packages/azimuth-watcher/merge-toml.js - ../config/watcher-azimuth/start-server.sh:/app/packages/azimuth-watcher/start-server.sh + - azimuth_watcher_gql_logs_data:/app/packages/azimuth-watcher/gql-logs ports: - "3001" - "9001" @@ -136,6 +137,7 @@ services: - ../config/watcher-azimuth/watcher-config-template.toml:/app/packages/censures-watcher/environments/watcher-config-template.toml - ../config/watcher-azimuth/merge-toml.js:/app/packages/censures-watcher/merge-toml.js - ../config/watcher-azimuth/start-server.sh:/app/packages/censures-watcher/start-server.sh + - censures_watcher_gql_logs_data:/app/packages/censures-watcher/gql-logs ports: - "3002" - "9003" @@ -198,6 +200,7 @@ services: - ../config/watcher-azimuth/watcher-config-template.toml:/app/packages/claims-watcher/environments/watcher-config-template.toml - ../config/watcher-azimuth/merge-toml.js:/app/packages/claims-watcher/merge-toml.js - ../config/watcher-azimuth/start-server.sh:/app/packages/claims-watcher/start-server.sh + - claims_watcher_gql_logs_data:/app/packages/claims-watcher/gql-logs ports: - "3003" - "9005" @@ -260,6 +263,7 @@ services: - ../config/watcher-azimuth/watcher-config-template.toml:/app/packages/conditional-star-release-watcher/environments/watcher-config-template.toml - ../config/watcher-azimuth/merge-toml.js:/app/packages/conditional-star-release-watcher/merge-toml.js - ../config/watcher-azimuth/start-server.sh:/app/packages/conditional-star-release-watcher/start-server.sh + - conditional_star_release_watcher_gql_logs_data:/app/packages/conditional-star-release-watcher/gql-logs ports: - "3004" - "9007" @@ -322,6 +326,7 @@ services: - ../config/watcher-azimuth/watcher-config-template.toml:/app/packages/delegated-sending-watcher/environments/watcher-config-template.toml - ../config/watcher-azimuth/merge-toml.js:/app/packages/delegated-sending-watcher/merge-toml.js - ../config/watcher-azimuth/start-server.sh:/app/packages/delegated-sending-watcher/start-server.sh + - delegated_sending_watcher_gql_logs_data:/app/packages/delegated-sending-watcher/gql-logs ports: - "3005" - "9009" @@ -384,6 +389,7 @@ services: - ../config/watcher-azimuth/watcher-config-template.toml:/app/packages/ecliptic-watcher/environments/watcher-config-template.toml - ../config/watcher-azimuth/merge-toml.js:/app/packages/ecliptic-watcher/merge-toml.js - ../config/watcher-azimuth/start-server.sh:/app/packages/ecliptic-watcher/start-server.sh + - ecliptic_watcher_gql_logs_data:/app/packages/ecliptic-watcher/gql-logs ports: - "3006" - "9011" @@ -446,6 +452,7 @@ services: - ../config/watcher-azimuth/watcher-config-template.toml:/app/packages/linear-star-release-watcher/environments/watcher-config-template.toml - ../config/watcher-azimuth/merge-toml.js:/app/packages/linear-star-release-watcher/merge-toml.js - ../config/watcher-azimuth/start-server.sh:/app/packages/linear-star-release-watcher/start-server.sh + - linear_star_release_watcher_gql_logs_data:/app/packages/linear-star-release-watcher/gql-logs ports: - "3007" - "9013" @@ -508,6 +515,7 @@ services: - ../config/watcher-azimuth/watcher-config-template.toml:/app/packages/polls-watcher/environments/watcher-config-template.toml - ../config/watcher-azimuth/merge-toml.js:/app/packages/polls-watcher/merge-toml.js - ../config/watcher-azimuth/start-server.sh:/app/packages/polls-watcher/start-server.sh + - polls_watcher_gql_logs_data:/app/packages/polls-watcher/gql-logs ports: - "3008" - "9015" @@ -560,3 +568,11 @@ services: volumes: watcher_db_data: + azimuth_watcher_gql_logs_data: + censures_watcher_gql_logs_data: + claims_watcher_gql_logs_data: + conditional_star_release_watcher_gql_logs_data: + delegated_sending_watcher_gql_logs_data: + ecliptic_watcher_gql_logs_data: + linear_star_release_watcher_gql_logs_data: + polls_watcher_gql_logs_data: diff --git a/stack_orchestrator/data/compose/docker-compose-watcher-merkl-sushiswap-v3.yml b/stack_orchestrator/data/compose/docker-compose-watcher-merkl-sushiswap-v3.yml index f7e505df..6a446b1f 100644 --- a/stack_orchestrator/data/compose/docker-compose-watcher-merkl-sushiswap-v3.yml +++ b/stack_orchestrator/data/compose/docker-compose-watcher-merkl-sushiswap-v3.yml @@ -60,6 +60,7 @@ services: volumes: - ../config/watcher-merkl-sushiswap-v3/watcher-config-template.toml:/app/environments/watcher-config-template.toml - ../config/watcher-merkl-sushiswap-v3/start-server.sh:/app/start-server.sh + - merkl_sushiswap_v3_watcher_gql_logs_data:/app/gql-logs ports: - "127.0.0.1:3007:3008" - "9003:9001" @@ -74,3 +75,4 @@ services: volumes: merkl_sushiswap_v3_watcher_db_data: + merkl_sushiswap_v3_watcher_gql_logs_data: diff --git a/stack_orchestrator/data/compose/docker-compose-watcher-sushiswap-v3.yml b/stack_orchestrator/data/compose/docker-compose-watcher-sushiswap-v3.yml index 9aad9888..5cb6176f 100644 --- a/stack_orchestrator/data/compose/docker-compose-watcher-sushiswap-v3.yml +++ b/stack_orchestrator/data/compose/docker-compose-watcher-sushiswap-v3.yml @@ -60,6 +60,7 @@ services: volumes: - ../config/watcher-sushiswap-v3/watcher-config-template.toml:/app/environments/watcher-config-template.toml - ../config/watcher-sushiswap-v3/start-server.sh:/app/start-server.sh + - sushiswap_v3_watcher_gql_logs_data:/app/gql-logs ports: - "127.0.0.1:3008:3008" - "9001:9001" @@ -74,3 +75,4 @@ services: volumes: sushiswap_v3_watcher_db_data: + sushiswap_v3_watcher_gql_logs_data: diff --git a/stack_orchestrator/data/stacks/azimuth/stack.yml b/stack_orchestrator/data/stacks/azimuth/stack.yml index fe71d421..8c942319 100644 --- a/stack_orchestrator/data/stacks/azimuth/stack.yml +++ b/stack_orchestrator/data/stacks/azimuth/stack.yml @@ -1,7 +1,7 @@ version: "1.0" name: azimuth repos: - - github.com/cerc-io/azimuth-watcher-ts@0.1.7 + - github.com/cerc-io/azimuth-watcher-ts@0.1.6 containers: - cerc/watcher-azimuth pods: -- 2.45.2 From e9d7fd4666a1c6bc3560d6ed53436be00d6b8276 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Wed, 12 Jun 2024 17:02:33 +0530 Subject: [PATCH 10/11] Use latest processed block metric from sync status in watcher dashboard --- .../grafana/dashboards/watcher-dashboard.json | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/stack_orchestrator/data/config/monitoring/grafana/dashboards/watcher-dashboard.json b/stack_orchestrator/data/config/monitoring/grafana/dashboards/watcher-dashboard.json index 5e0303da..b2582615 100644 --- a/stack_orchestrator/data/config/monitoring/grafana/dashboards/watcher-dashboard.json +++ b/stack_orchestrator/data/config/monitoring/grafana/dashboards/watcher-dashboard.json @@ -18,7 +18,7 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 4, + "id": 2, "links": [ { "asDropdown": false, @@ -311,7 +311,7 @@ }, "disableTextWrap": false, "editorMode": "code", - "expr": "last_processed_block_number{job=~\"$job\", instance=~\"$watcher\"}", + "expr": "sync_status_block_number{job=~\"$job\", instance=~\"$watcher\", kind=\"latest_processed\"}", "fullMetaSearch": false, "hide": false, "includeNullMetadata": true, @@ -708,7 +708,7 @@ "uid": "PBFA97CFB590B2093" }, "editorMode": "code", - "expr": "last_processed_block_number{job=~\"$job\", instance=~\"$watcher\"}", + "expr": "sync_status_block_number{job=~\"$job\", instance=~\"$watcher\", kind=\"latest_processed\"}", "hide": false, "instant": false, "legendFormat": "{{__name__}}", @@ -725,7 +725,7 @@ "binary": { "left": "latest_upstream_block_number", "operator": "-", - "right": "last_processed_block_number" + "right": "sync_status_block_number" }, "mode": "binary", "reduce": { @@ -819,7 +819,7 @@ "uid": "PBFA97CFB590B2093" }, "editorMode": "code", - "expr": "last_processed_block_number{job=~\"$job\", instance=~\"$watcher\"}", + "expr": "sync_status_block_number{job=~\"$job\", instance=~\"$watcher\", kind=\"latest_processed\"}", "hide": false, "instant": false, "legendFormat": "{{__name__}}", @@ -836,7 +836,7 @@ "binary": { "left": "latest_block_number", "operator": "-", - "right": "last_processed_block_number" + "right": "sync_status_block_number" }, "mode": "binary", "reduce": { @@ -1005,12 +1005,12 @@ "uid": "PBFA97CFB590B2093" }, "disableTextWrap": false, - "editorMode": "builder", - "expr": "last_processed_block_number{job=~\"$job\", instance=~\"$watcher\"}", + "editorMode": "code", + "expr": "sync_status_block_number{job=~\"$job\", instance=~\"$watcher\", kind=\"latest_processed\"}", "fullMetaSearch": false, "includeNullMetadata": true, "instant": false, - "legendFormat": "latest_processed", + "legendFormat": "{{kind}}", "range": true, "refId": "A", "useBackend": false @@ -1021,7 +1021,7 @@ "uid": "PBFA97CFB590B2093" }, "disableTextWrap": false, - "editorMode": "builder", + "editorMode": "code", "expr": "sync_status_block_number{job=~\"$job\", instance=~\"$watcher\", kind=\"latest_canonical\"}", "fullMetaSearch": false, "hide": false, @@ -1464,7 +1464,7 @@ "uid": "PBFA97CFB590B2093" }, "editorMode": "code", - "expr": "sync_status_block_number{job=~\"$job\", instance=~\"$watcher\", kind=\"latest_indexed\"}", + "expr": "sync_status_block_number{job=~\"$job\", instance=~\"$watcher\", kind=\"latest_processed\"}", "hide": false, "instant": false, "legendFormat": "{{__name__}}", -- 2.45.2 From 40e44b4effb17b6ee0f93f3732b88c14a4ee0175 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Wed, 12 Jun 2024 17:04:54 +0530 Subject: [PATCH 11/11] Revert "Increase diff threshold for subgraph watcher alerts" This reverts commit cd05d26895e0b03a5fb530aebf7665ef72b4138f. --- .../data/config/monitoring/watcher-alert-rules.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stack_orchestrator/data/config/monitoring/watcher-alert-rules.yml b/stack_orchestrator/data/config/monitoring/watcher-alert-rules.yml index a1ee9002..e5710565 100644 --- a/stack_orchestrator/data/config/monitoring/watcher-alert-rules.yml +++ b/stack_orchestrator/data/config/monitoring/watcher-alert-rules.yml @@ -684,7 +684,7 @@ groups: name: Expression type: __expr__ uid: __expr__ - expression: ${diff} >= 32 + expression: ${diff} >= 16 intervalMs: 1000 maxDataPoints: 43200 refId: condition @@ -760,7 +760,7 @@ groups: name: Expression type: __expr__ uid: __expr__ - expression: ${diff} >= 32 + expression: ${diff} >= 16 intervalMs: 1000 maxDataPoints: 43200 refId: condition @@ -838,7 +838,7 @@ groups: name: Expression type: __expr__ uid: __expr__ - expression: ${diff} >= 32 + expression: ${diff} >= 16 intervalMs: 1000 maxDataPoints: 43200 refId: condition -- 2.45.2