From 48a306eb30d48daa54f478b469f410a752233fd5 Mon Sep 17 00:00:00 2001 From: Gusto Date: Mon, 9 Dec 2024 16:39:23 +0200 Subject: [PATCH] Predefined dashboard for testnet metrics. --- compose.static.yml | 2 + testnet/monitoring/grafana/dashboards.yml | 8 + .../grafana/dashboards/testnet_metrics.json | 237 ++++++++++++++++++ testnet/scripts/run_nomos_executor.sh | 2 +- testnet/scripts/run_nomos_node.sh | 2 +- 5 files changed, 249 insertions(+), 2 deletions(-) create mode 100644 testnet/monitoring/grafana/dashboards.yml create mode 100644 testnet/monitoring/grafana/dashboards/testnet_metrics.json diff --git a/compose.static.yml b/compose.static.yml index 0a2e6c0a..e2ddc504 100644 --- a/compose.static.yml +++ b/compose.static.yml @@ -10,6 +10,8 @@ services: image: nomos:latest volumes: - ./testnet:/etc/nomos + depends_on: + - grafana entrypoint: /etc/nomos/scripts/run_cfgsync.sh nomos-node-0: diff --git a/testnet/monitoring/grafana/dashboards.yml b/testnet/monitoring/grafana/dashboards.yml new file mode 100644 index 00000000..95a66045 --- /dev/null +++ b/testnet/monitoring/grafana/dashboards.yml @@ -0,0 +1,8 @@ +apiVersion: 1 +providers: + - name: 'default' + orgId: 1 + folder: '' + type: 'file' + options: + path: '/var/lib/grafana/dashboards' diff --git a/testnet/monitoring/grafana/dashboards/testnet_metrics.json b/testnet/monitoring/grafana/dashboards/testnet_metrics.json new file mode 100644 index 00000000..454c2609 --- /dev/null +++ b/testnet/monitoring/grafana/dashboards/testnet_metrics.json @@ -0,0 +1,237 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 1, + "links": [], + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.4.0", + "targets": [ + { + "disableTextWrap": false, + "editorMode": "builder", + "expr": "da_mempool_pending_items", + "fullMetaSearch": false, + "includeNullMetadata": true, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "Mempool: Pending DA blobs", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.4.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "consensus_processed_blocks", + "fullMetaSearch": false, + "includeNullMetadata": true, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "Consensus: Processed Blocks", + "type": "timeseries" + } + ], + "preload": false, + "schemaVersion": 40, + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Testnet Metrics", + "uid": "ce6ebepwk737kf", + "version": 5, + "weekStart": "" +} diff --git a/testnet/scripts/run_nomos_executor.sh b/testnet/scripts/run_nomos_executor.sh index a304eb42..9fab2a6d 100755 --- a/testnet/scripts/run_nomos_executor.sh +++ b/testnet/scripts/run_nomos_executor.sh @@ -11,4 +11,4 @@ export CFG_FILE_PATH="/config.yaml" \ RISC0_DEV_MODE=true /usr/bin/cfgsync-client && \ - exec /usr/bin/nomos-executor /config.yaml --with-metrics + exec /usr/bin/nomos-executor /config.yaml diff --git a/testnet/scripts/run_nomos_node.sh b/testnet/scripts/run_nomos_node.sh index eb9d6b71..d8c73384 100755 --- a/testnet/scripts/run_nomos_node.sh +++ b/testnet/scripts/run_nomos_node.sh @@ -10,4 +10,4 @@ export CFG_FILE_PATH="/config.yaml" \ RISC0_DEV_MODE=true /usr/bin/cfgsync-client && \ - exec /usr/bin/nomos-node /config.yaml --with-metrics + exec /usr/bin/nomos-node /config.yaml