From d4e42d2aec76b55f1d6cd7df70144a99c67216bd Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Mon, 18 Dec 2023 15:12:20 +0530 Subject: [PATCH] Update watcher dashboards for upstream and external chain heads --- .../compose/docker-compose-prom-server.yml | 15 +++++++ .../grafana/watcher-dashboard-template.json | 40 +++++++++++++++++- .../azimuth/azimuth-watcher-dashboard.json | 40 +++++++++++++++++- .../azimuth/censures-watcher-dashboard.json | 40 +++++++++++++++++- .../azimuth/claims-watcher-dashboard.json | 40 +++++++++++++++++- ...tional-star-release-watcher-dashboard.json | 40 +++++++++++++++++- ...ted-sending-watcher-watcher-dashboard.json | 40 +++++++++++++++++- .../azimuth/ecliptic-watcher-dashboard.json | 40 +++++++++++++++++- ...linear-star-release-watcher-dashboard.json | 40 +++++++++++++++++- .../azimuth/polls-watcher-dashboard.json | 40 +++++++++++++++++- .../merkl-sushiswap-watcher-dashboard.json | 40 +++++++++++++++++- .../sushi/sushiswap-watcher-dashboard.json | 42 +++++++++++++++++-- .../monitoring/prometheus/prometheus.yml | 9 +++- .../data/stacks/monitoring/stack.yml | 2 + 14 files changed, 444 insertions(+), 24 deletions(-) diff --git a/stack_orchestrator/data/compose/docker-compose-prom-server.yml b/stack_orchestrator/data/compose/docker-compose-prom-server.yml index e3faecc8..27b8c18c 100644 --- a/stack_orchestrator/data/compose/docker-compose-prom-server.yml +++ b/stack_orchestrator/data/compose/docker-compose-prom-server.yml @@ -28,5 +28,20 @@ services: extra_hosts: - "host.docker.internal:host-gateway" + chain-head-exporter: + image: cerc/watcher-ts:local + restart: always + working_dir: /app/packages/cli + environment: + ETH_RPC_ENDPOINT: ${CERC_ETH_RPC_ENDPOINT} + FIL_RPC_ENDPOINT: ${CERC_FIL_RPC_ENDPOINT} + ETH_RPC_API_KEY: ${CERC_INFURA_KEY} + PORT: ${CERC_METRICS_PORT} + command: ["sh", "-c", "yarn export-metrics:chain-heads"] + ports: + - '5000' + extra_hosts: + - "host.docker.internal:host-gateway" + volumes: prometheus_data: diff --git a/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboard-template.json b/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboard-template.json index 640b7a16..1abb276a 100644 --- a/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboard-template.json +++ b/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboard-template.json @@ -95,7 +95,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "description": "Chain head block number of upstream endpoint", + "description": "Chain head block number of the upstream endpoint", "fieldConfig": { "defaults": { "color": { @@ -138,6 +138,24 @@ "wideLayout": true }, "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "latest_upstream_block_number{job=\"REPLACE_WITH_WATCHER_JOB\", instance=\"REPLACE_WITH_WATCHER_NAME\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], "title": "Upstream chain head", "type": "stat" }, @@ -146,7 +164,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "description": "Chain head from a public endpoint (etherscan)", + "description": "Chain head from an external public endpoint", "fieldConfig": { "defaults": { "color": { @@ -189,6 +207,24 @@ "wideLayout": true }, "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "latest_block_number{job=\"chain_heads\", chain=\"REPLACE_WITH_WATCHER_CHAIN\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], "title": "External chain head", "type": "stat" }, diff --git a/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/azimuth-watcher-dashboard.json b/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/azimuth-watcher-dashboard.json index 42e0855c..f7cb673f 100644 --- a/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/azimuth-watcher-dashboard.json +++ b/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/azimuth-watcher-dashboard.json @@ -95,7 +95,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "description": "Chain head block number of upstream endpoint", + "description": "Chain head block number of the upstream endpoint", "fieldConfig": { "defaults": { "color": { @@ -138,6 +138,24 @@ "wideLayout": true }, "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "latest_upstream_block_number{job=\"azimuth\", instance=\"azimuth\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], "title": "Upstream chain head", "type": "stat" }, @@ -146,7 +164,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "description": "Chain head from a public endpoint (etherscan)", + "description": "Chain head from an external public endpoint", "fieldConfig": { "defaults": { "color": { @@ -189,6 +207,24 @@ "wideLayout": true }, "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "latest_block_number{job=\"chain_heads\", chain=\"ethereum\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], "title": "External chain head", "type": "stat" }, diff --git a/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/censures-watcher-dashboard.json b/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/censures-watcher-dashboard.json index 14bf1be5..8f926c18 100644 --- a/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/censures-watcher-dashboard.json +++ b/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/censures-watcher-dashboard.json @@ -95,7 +95,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "description": "Chain head block number of upstream endpoint", + "description": "Chain head block number of the upstream endpoint", "fieldConfig": { "defaults": { "color": { @@ -138,6 +138,24 @@ "wideLayout": true }, "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "latest_upstream_block_number{job=\"azimuth\", instance=\"censures\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], "title": "Upstream chain head", "type": "stat" }, @@ -146,7 +164,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "description": "Chain head from a public endpoint (etherscan)", + "description": "Chain head from an external public endpoint", "fieldConfig": { "defaults": { "color": { @@ -189,6 +207,24 @@ "wideLayout": true }, "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "latest_block_number{job=\"chain_heads\", chain=\"ethereum\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], "title": "External chain head", "type": "stat" }, diff --git a/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/claims-watcher-dashboard.json b/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/claims-watcher-dashboard.json index e738ba78..a11fffc6 100644 --- a/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/claims-watcher-dashboard.json +++ b/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/claims-watcher-dashboard.json @@ -95,7 +95,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "description": "Chain head block number of upstream endpoint", + "description": "Chain head block number of the upstream endpoint", "fieldConfig": { "defaults": { "color": { @@ -138,6 +138,24 @@ "wideLayout": true }, "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "latest_upstream_block_number{job=\"azimuth\", instance=\"claims\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], "title": "Upstream chain head", "type": "stat" }, @@ -146,7 +164,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "description": "Chain head from a public endpoint (etherscan)", + "description": "Chain head from an external public endpoint", "fieldConfig": { "defaults": { "color": { @@ -189,6 +207,24 @@ "wideLayout": true }, "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "latest_block_number{job=\"chain_heads\", chain=\"ethereum\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], "title": "External chain head", "type": "stat" }, diff --git a/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/conditional-star-release-watcher-dashboard.json b/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/conditional-star-release-watcher-dashboard.json index f089b41c..bba12b3e 100644 --- a/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/conditional-star-release-watcher-dashboard.json +++ b/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/conditional-star-release-watcher-dashboard.json @@ -95,7 +95,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "description": "Chain head block number of upstream endpoint", + "description": "Chain head block number of the upstream endpoint", "fieldConfig": { "defaults": { "color": { @@ -138,6 +138,24 @@ "wideLayout": true }, "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "latest_upstream_block_number{job=\"azimuth\", instance=\"conditional_star_release\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], "title": "Upstream chain head", "type": "stat" }, @@ -146,7 +164,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "description": "Chain head from a public endpoint (etherscan)", + "description": "Chain head from an external public endpoint", "fieldConfig": { "defaults": { "color": { @@ -189,6 +207,24 @@ "wideLayout": true }, "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "latest_block_number{job=\"chain_heads\", chain=\"ethereum\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], "title": "External chain head", "type": "stat" }, diff --git a/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/delegated-sending-watcher-watcher-dashboard.json b/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/delegated-sending-watcher-watcher-dashboard.json index 015d5243..dcfc9ddd 100644 --- a/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/delegated-sending-watcher-watcher-dashboard.json +++ b/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/delegated-sending-watcher-watcher-dashboard.json @@ -95,7 +95,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "description": "Chain head block number of upstream endpoint", + "description": "Chain head block number of the upstream endpoint", "fieldConfig": { "defaults": { "color": { @@ -138,6 +138,24 @@ "wideLayout": true }, "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "latest_upstream_block_number{job=\"azimuth\", instance=\"delegated_sending_watcher\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], "title": "Upstream chain head", "type": "stat" }, @@ -146,7 +164,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "description": "Chain head from a public endpoint (etherscan)", + "description": "Chain head from an external public endpoint", "fieldConfig": { "defaults": { "color": { @@ -189,6 +207,24 @@ "wideLayout": true }, "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "latest_block_number{job=\"chain_heads\", chain=\"ethereum\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], "title": "External chain head", "type": "stat" }, diff --git a/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/ecliptic-watcher-dashboard.json b/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/ecliptic-watcher-dashboard.json index 6aca6504..ddfe18eb 100644 --- a/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/ecliptic-watcher-dashboard.json +++ b/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/ecliptic-watcher-dashboard.json @@ -95,7 +95,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "description": "Chain head block number of upstream endpoint", + "description": "Chain head block number of the upstream endpoint", "fieldConfig": { "defaults": { "color": { @@ -138,6 +138,24 @@ "wideLayout": true }, "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "latest_upstream_block_number{job=\"azimuth\", instance=\"ecliptic\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], "title": "Upstream chain head", "type": "stat" }, @@ -146,7 +164,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "description": "Chain head from a public endpoint (etherscan)", + "description": "Chain head from an external public endpoint", "fieldConfig": { "defaults": { "color": { @@ -189,6 +207,24 @@ "wideLayout": true }, "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "latest_block_number{job=\"chain_heads\", chain=\"ethereum\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], "title": "External chain head", "type": "stat" }, diff --git a/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/linear-star-release-watcher-dashboard.json b/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/linear-star-release-watcher-dashboard.json index eb8e62de..a2a2bf93 100644 --- a/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/linear-star-release-watcher-dashboard.json +++ b/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/linear-star-release-watcher-dashboard.json @@ -95,7 +95,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "description": "Chain head block number of upstream endpoint", + "description": "Chain head block number of the upstream endpoint", "fieldConfig": { "defaults": { "color": { @@ -138,6 +138,24 @@ "wideLayout": true }, "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "latest_upstream_block_number{job=\"azimuth\", instance=\"linear_star_release\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], "title": "Upstream chain head", "type": "stat" }, @@ -146,7 +164,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "description": "Chain head from a public endpoint (etherscan)", + "description": "Chain head from an external public endpoint", "fieldConfig": { "defaults": { "color": { @@ -189,6 +207,24 @@ "wideLayout": true }, "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "latest_block_number{job=\"chain_heads\", chain=\"ethereum\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], "title": "External chain head", "type": "stat" }, diff --git a/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/polls-watcher-dashboard.json b/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/polls-watcher-dashboard.json index fe894c5d..c68a1826 100644 --- a/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/polls-watcher-dashboard.json +++ b/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/azimuth/polls-watcher-dashboard.json @@ -95,7 +95,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "description": "Chain head block number of upstream endpoint", + "description": "Chain head block number of the upstream endpoint", "fieldConfig": { "defaults": { "color": { @@ -138,6 +138,24 @@ "wideLayout": true }, "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "latest_upstream_block_number{job=\"azimuth\", instance=\"polls\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], "title": "Upstream chain head", "type": "stat" }, @@ -146,7 +164,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "description": "Chain head from a public endpoint (etherscan)", + "description": "Chain head from an external public endpoint", "fieldConfig": { "defaults": { "color": { @@ -189,6 +207,24 @@ "wideLayout": true }, "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "latest_block_number{job=\"chain_heads\", chain=\"ethereum\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], "title": "External chain head", "type": "stat" }, diff --git a/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/sushi/merkl-sushiswap-watcher-dashboard.json b/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/sushi/merkl-sushiswap-watcher-dashboard.json index f76815e7..7a16e332 100644 --- a/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/sushi/merkl-sushiswap-watcher-dashboard.json +++ b/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/sushi/merkl-sushiswap-watcher-dashboard.json @@ -95,7 +95,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "description": "Chain head block number of upstream endpoint", + "description": "Chain head block number of the upstream endpoint", "fieldConfig": { "defaults": { "color": { @@ -138,6 +138,24 @@ "wideLayout": true }, "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "latest_upstream_block_number{job=\"sushi\", instance=\"merkl_sushiswap\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], "title": "Upstream chain head", "type": "stat" }, @@ -146,7 +164,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "description": "Chain head from a public endpoint (filfox)", + "description": "Chain head from an external public endpoint", "fieldConfig": { "defaults": { "color": { @@ -189,6 +207,24 @@ "wideLayout": true }, "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "latest_block_number{job=\"chain_heads\", chain=\"filecoin\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], "title": "External chain head", "type": "stat" }, diff --git a/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/sushi/sushiswap-watcher-dashboard.json b/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/sushi/sushiswap-watcher-dashboard.json index bcaa97f6..fffd722b 100644 --- a/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/sushi/sushiswap-watcher-dashboard.json +++ b/stack_orchestrator/data/config/monitoring/grafana/watcher-dashboards/sushi/sushiswap-watcher-dashboard.json @@ -95,7 +95,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "description": "Chain head block number of upstream endpoint", + "description": "Chain head block number of the upstream endpoint", "fieldConfig": { "defaults": { "color": { @@ -138,6 +138,24 @@ "wideLayout": true }, "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "latest_upstream_block_number{job=\"sushi\", instance=\"sushiswap\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], "title": "Upstream chain head", "type": "stat" }, @@ -146,7 +164,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "description": "Chain head from a public endpoint (filfox)", + "description": "Chain head from an external public endpoint", "fieldConfig": { "defaults": { "color": { @@ -189,6 +207,24 @@ "wideLayout": true }, "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "latest_block_number{job=\"chain_heads\", chain=\"filecoin\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], "title": "External chain head", "type": "stat" }, @@ -1174,6 +1210,6 @@ "timepicker": {}, "timezone": "", "title": "sushiswap watcher", - "version": 3, + "version": 1, "weekStart": "" } diff --git a/stack_orchestrator/data/config/monitoring/prometheus/prometheus.yml b/stack_orchestrator/data/config/monitoring/prometheus/prometheus.yml index 6b2e380e..f7631198 100644 --- a/stack_orchestrator/data/config/monitoring/prometheus/prometheus.yml +++ b/stack_orchestrator/data/config/monitoring/prometheus/prometheus.yml @@ -1,5 +1,5 @@ global: - scrape_interval: 15s + scrape_interval: 10s evaluation_interval: 15s rule_files: @@ -31,3 +31,10 @@ scrape_configs: regex: .* target_label: __address__ replacement: blackbox:9115 + + - job_name: chain_heads + metrics_path: /metrics + scheme: http + static_configs: + - targets: ['chain-head-exporter:5000'] + diff --git a/stack_orchestrator/data/stacks/monitoring/stack.yml b/stack_orchestrator/data/stacks/monitoring/stack.yml index c3532024..6a1e3d7e 100644 --- a/stack_orchestrator/data/stacks/monitoring/stack.yml +++ b/stack_orchestrator/data/stacks/monitoring/stack.yml @@ -1,7 +1,9 @@ version: "0.1" name: monitoring repos: + - github.com/cerc-io/watcher-ts # @v0.2.79 containers: + - cerc/watcher-ts pods: - prom-server - grafana