diff --git a/crates/relayer-utils/src/metric.rs b/crates/relayer-utils/src/metric.rs index ec6320d34..53bcbaacc 100644 --- a/crates/relayer-utils/src/metric.rs +++ b/crates/relayer-utils/src/metric.rs @@ -34,8 +34,6 @@ pub struct ResourceMetric { pub struct Metrics { /// Bridge watcher back off metric pub bridge_watcher_back_off: GenericCounter, - /// Total active Relayer metric - pub total_active_relayer: GenericCounter, /// Total transaction made Relayer metric pub total_transaction_made: GenericCounter, /// Anchor update proposals proposed by relayer @@ -73,11 +71,6 @@ impl Metrics { "specifies how many times the bridge watcher backed off" )?; - let total_active_relayer_counter = register_counter!( - "total_active_relayer", - "The total number of active relayers", - )?; - let total_transaction_made_counter = register_counter!( "total_transaction_made", "The total number of transaction made", @@ -140,7 +133,6 @@ impl Metrics { Ok(Self { bridge_watcher_back_off: bridge_watcher_back_off_counter, - total_active_relayer: total_active_relayer_counter, total_transaction_made: total_transaction_made_counter, anchor_update_proposals: anchor_update_proposals_counter, proposals_signed: proposals_signed_counter, diff --git a/docker/grafana/grafana-dashboard.json b/docker/grafana/grafana-dashboard.json index 47c6b4fcf..23a1e472c 100644 --- a/docker/grafana/grafana-dashboard.json +++ b/docker/grafana/grafana-dashboard.json @@ -1,142 +1,726 @@ { - "annotations": { - "list": [ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 1, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "ZeGwngPVz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 0 + }, + "id": 6, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.7", + "targets": [ { - "builtIn": 1, "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" + "type": "prometheus", + "uid": "ZeGwngPVz" }, - "type": "dashboard" + "editorMode": "builder", + "expr": "total_fee_earned", + "legendFormat": "__auto", + "range": true, + "refId": "A" } - ] + ], + "title": "Total fee earned", + "type": "stat" }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": 1, - "links": [], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "BtDYMgE4z" + { + "datasource": { + "type": "prometheus", + "uid": "ZeGwngPVz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 0 + }, + "id": 4, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "ZeGwngPVz" + }, + "editorMode": "builder", + "expr": "gas_spent", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Gas spent", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "ZeGwngPVz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "fillOpacity": 70, + "lineWidth": 1 + }, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 1, + "text": "Down" + }, + "1": { + "color": "green", + "index": 0, + "text": "Up" + } }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" + "type": "value" + } + ], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 2, + "options": { + "colWidth": 0.9, + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "rowHeight": 0.9, + "showValue": "auto", + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "ZeGwngPVz" + }, + "editorMode": "builder", + "exemplar": false, + "expr": "up", + "format": "heatmap", + "instant": false, + "legendFormat": "Uptime", + "range": true, + "refId": "A" + } + ], + "title": "Status", + "type": "status-history" + }, + { + "datasource": { + "type": "prometheus", + "uid": "ZeGwngPVz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" }, - "thresholdsStyle": { - "mode": "off" + { + "color": "red", + "value": 80 } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 6 + }, + "id": 14, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "ZeGwngPVz" + }, + "editorMode": "builder", + "expr": "total_amount_of_data_stored", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Total amount of data stored", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "ZeGwngPVz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "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" + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] } }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "BtDYMgE4z" + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 6 + }, + "id": 10, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "ZeGwngPVz" + }, + "editorMode": "builder", + "expr": "proposals_processed_evm_tx_queue", + "legendFormat": "{{__name__}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "ZeGwngPVz" + }, + "editorMode": "builder", + "expr": "proposals_processed_substrate_tx_queue", + "hide": false, + "legendFormat": "{{__name__}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "ZeGwngPVz" + }, + "editorMode": "builder", + "expr": "proposals_processed_tx_queue", + "hide": false, + "legendFormat": "{{__name__}}", + "range": true, + "refId": "C" + } + ], + "title": "Processed Transactions", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "ZeGwngPVz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false }, - "editorMode": "builder", - "expr": "bridge_watcher_back_off", - "legendFormat": "__auto", - "range": true, - "refId": "A" + "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" + }, + { + "color": "red", + "value": 80 + } + ] } - ], - "title": "Panel Title", - "type": "timeseries" - } - ], - "refresh": "", - "revision": 1, - "schemaVersion": 38, - "style": "dark", - "tags": [], - "templating": { - "list": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 14 + }, + "id": 12, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "ZeGwngPVz" + }, + "editorMode": "builder", + "expr": "evm_transaction_queue_back_off", + "legendFormat": "{{__name__}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "ZeGwngPVz" + }, + "editorMode": "builder", + "expr": "substrate_transaction_queue_back_off", + "hide": false, + "legendFormat": "{{__name__}}", + "range": true, + "refId": "B" + } + ], + "title": "Queue Backoff", + "type": "timeseries" }, - "time": { - "from": "now-6h", - "to": "now" + { + "datasource": { + "type": "prometheus", + "uid": "ZeGwngPVz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 14 + }, + "id": 8, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "ZeGwngPVz" + }, + "editorMode": "builder", + "expr": "evm_transaction_queue_back_off", + "legendFormat": "{{__name__}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "ZeGwngPVz" + }, + "editorMode": "builder", + "expr": "bridge_watcher_back_off", + "hide": false, + "legendFormat": "{{__name__}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "ZeGwngPVz" + }, + "editorMode": "builder", + "expr": "substrate_transaction_queue_back_off", + "hide": false, + "legendFormat": "{{__name__}}", + "range": true, + "refId": "C" + } + ], + "title": "Backoff", + "type": "timeseries" }, - "timepicker": {}, - "timezone": "", - "title": "Relayer", - "uid": "c3fyMgPVz", - "version": 2, - "weekStart": "" - } \ No newline at end of file + { + "datasource": { + "type": "prometheus", + "uid": "ZeGwngPVz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 22 + }, + "id": 16, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "ZeGwngPVz" + }, + "editorMode": "builder", + "expr": "proposals_signed", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Proposals signed", + "type": "stat" + } + ], + "refresh": false, + "revision": 1, + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "2023-04-17T12:06:23.600Z", + "to": "2023-04-17T12:23:15.000Z" + }, + "timepicker": {}, + "timezone": "", + "title": "Relayer", + "uid": "c3fyMgPVz", + "version": 4, + "weekStart": "" +}