From feb30502c74a6b3550a821068ca41ad95ebc5675 Mon Sep 17 00:00:00 2001 From: Wojtek Date: Wed, 12 Jun 2024 12:51:33 +0200 Subject: [PATCH] Show vote metrics on dashboard --- .../grafana/config/dashboards/bdjuno.json | 200 +++++++++++++++++- 1 file changed, 199 insertions(+), 1 deletion(-) diff --git a/infra/apps/grafana/config/dashboards/bdjuno.json b/infra/apps/grafana/config/dashboards/bdjuno.json index 086553b0..9add228b 100644 --- a/infra/apps/grafana/config/dashboards/bdjuno.json +++ b/infra/apps/grafana/config/dashboards/bdjuno.json @@ -224,9 +224,207 @@ ], "title": "Successful proposals", "type": "barchart" + }, + { + "datasource": { + "type": "prometheus", + "uid": "P168AE35C7276FF55" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 9 + }, + "id": 5, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "P168AE35C7276FF55" + }, + "editorMode": "code", + "expr": "(sum(increase(cometbft_consensus_vote_deviation_sum{}[$__range])) by (validator_address)) / (sum(increase(cometbft_consensus_vote_deviation_count{}[$__range])) by (validator_address))", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Vote time deviation", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "P168AE35C7276FF55" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "fillOpacity": 80, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 1, + "scaleDistribution": { + "type": "linear" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [ + { + "options": { + "from": 0, + "result": { + "color": "red", + "index": 0 + }, + "to": 0.9 + }, + "type": "range" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 9 + }, + "id": 4, + "options": { + "barRadius": 0, + "barWidth": 0.97, + "fullHighlight": false, + "groupWidth": 0.7, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "orientation": "horizontal", + "showValue": "never", + "stacking": "none", + "tooltip": { + "mode": "multi", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "P168AE35C7276FF55" + }, + "editorMode": "code", + "exemplar": false, + "expr": "(sum(increase(cometbft_consensus_expected_voters_sum{}[$__range])) by (validator_address)) / (sum(increase(cometbft_consensus_expected_voters_count{}[$__range])) by (validator_address))", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "{{label_name}}", + "range": false, + "refId": "A" + } + ], + "title": "Successful votes", + "type": "barchart" } ], - "refresh": "auto", + "refresh": "5s", "schemaVersion": 38, "tags": [], "templating": {