diff --git a/.github/workflows/change-log-check.yml b/.github/workflows/change-log-check.yml index 1e5374179f..6fe9ac2a9f 100644 --- a/.github/workflows/change-log-check.yml +++ b/.github/workflows/change-log-check.yml @@ -17,7 +17,7 @@ jobs: if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-changelog') }} run: | git fetch origin ${{ github.base_ref }} - CHANGELOG_DIFF=$(git diff origin/${{ github.base_ref }} origin/${{ github.head_ref }} -- changelog.md) + CHANGELOG_DIFF=$(git diff ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} -- changelog.md) echo "${CHANGELOG_DIFF}" if [ -z "$CHANGELOG_DIFF" ]; then echo "ERROR: No changes detected in CHANGELOG.md. Please update the changelog." diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 079b8dfa92..936823a405 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -1,6 +1,6 @@ name: "Pull Request Labeler" on: - pull_request: + pull_request_target: types: - opened - edited diff --git a/.gitignore b/.gitignore index d53a2695bd..6a53c9be7b 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,11 @@ localnet/ganache/storage localnet/zetachain-monorepo /standalone-network/authz/tx.json /zetanode.log + +# Blockscout Files +contrib/localnet/blockscout/services/blockscout-db-data/* +contrib/localnet/blockscout/services/logs/* +contrib/localnet/blockscout/services/redis-data/* +contrib/localnet/blockscout/services/stats-db-data/* +contrib/localnet/grafana/addresses.txt +contrib/localnet/addresses.txt \ No newline at end of file diff --git a/Makefile b/Makefile index dd47b6a541..9bc41f0451 100644 --- a/Makefile +++ b/Makefile @@ -247,6 +247,19 @@ stateful-upgrade-source: stop-stateful-upgrade: cd contrib/localnet/ && $(DOCKER) compose -f docker-compose-stateful.yml down --remove-orphans +############################################################################### +### Monitoring ### +############################################################################### + +start-monitoring: + @echo "Starting monitoring services" + cd contrib/localnet/grafana/ && ./get-tss-address.sh + cd contrib/localnet/ && $(DOCKER) compose -f docker-compose-monitoring.yml up -d + +stop-monitoring: + @echo "Stopping monitoring services" + cd contrib/localnet/ && $(DOCKER) compose -f docker-compose-monitoring.yml down + ############################################################################### ### GoReleaser ### ############################################################################### diff --git a/changelog.md b/changelog.md index 1a15cfa3a4..f2ec931d7a 100644 --- a/changelog.md +++ b/changelog.md @@ -11,7 +11,7 @@ * ChainNoncesAll :Changed from `/zeta-chain/observer/chainNonces` to `/zeta-chain/observer/chainNonces` . It returns all the chain nonces for all chains. This returns the current nonce of the TSS address for all chains. ### Features - +* [1498](https://github.com/zeta-chain/node/pull/1498) - Add monitoring(grafana, prometheus, ethbalance) for localnet testing * [1395](https://github.com/zeta-chain/node/pull/1395) - Add state variable to track aborted zeta amount * [1410](https://github.com/zeta-chain/node/pull/1410) - `snapshots` commands * enable zetaclients to use dynamic gas price on zetachain - enables >0 min_gas_price in feemarket module diff --git a/contrib/localnet/README.md b/contrib/localnet/README.md index 467e0bc877..96143b06d5 100644 --- a/contrib/localnet/README.md +++ b/contrib/localnet/README.md @@ -76,6 +76,30 @@ which does the following docker compose command: # in zeta-node/contrib/localnet/orchestrator $ docker compose down --remove-orphans ``` +### Run monitoring setup +Before starting the monitoring setup, make sure the Zetacore API is up at http://localhost:1317. +You can also add any additional ETH addresses to monitor in zeta-node/contrib/localnet/grafana/addresses.txt file +```bash +# in zeta-node/ +make start-monitoring +``` +which does the following docker compose command: +```bash +# in zeta-node/contrib/localnet/ +$ docker compose -f docker-compose-monitoring.yml up -d +``` +### Grafana credentials and dashboards +The Grafana default credentials are admin:admin. The dashboards are located at http://localhost:3000. +### Stop monitoring setup +```bash +# in zeta-node/ +make stop-monitoring +``` +which does the following docker compose command: +```bash +# in zeta-node/contrib/localnet/ +$ docker compose -f docker-compose-monitoring.yml down --remove-orphans +``` ## Useful data diff --git a/contrib/localnet/docker-compose-monitoring.yml b/contrib/localnet/docker-compose-monitoring.yml new file mode 100644 index 0000000000..ad66f828ec --- /dev/null +++ b/contrib/localnet/docker-compose-monitoring.yml @@ -0,0 +1,47 @@ +version: '3' + +services: + grafana: + image: grafana/grafana:latest + container_name: grafana + hostname: grafana + volumes: + - ./grafana/datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml + - ./grafana/dashboards/:/etc/grafana/provisioning/dashboards + ports: + - "3000:3000" + networks: + mynetwork: + ipv4_address: 172.20.0.30 + + prometheus: + image: prom/prometheus:latest + container_name: prometheus + hostname: prometheus + volumes: + - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml + ports: + - "9090:9090" + networks: + mynetwork: + ipv4_address: 172.20.0.31 + + zetachain-exporter: + image: zetachain/zetachain-exporter:latest + container_name: zetachain-exporter + hostname: zetachain-exporter + volumes: + - ./grafana/addresses.txt:/app/addresses.txt + ports: + - "9015:9015" + networks: + mynetwork: + ipv4_address: 172.20.0.32 + environment: + - GETH=http://eth:8545 + +networks: + mynetwork: + ipam: + config: + - subnet: 172.20.0.0/24 \ No newline at end of file diff --git a/contrib/localnet/grafana/dashboards/cosmos_dashboard.json b/contrib/localnet/grafana/dashboards/cosmos_dashboard.json new file mode 100644 index 0000000000..85ca855f22 --- /dev/null +++ b/contrib/localnet/grafana/dashboards/cosmos_dashboard.json @@ -0,0 +1,1458 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "A Grafana dashboard compatible with all the cosmos-sdk and tendermint based blockchains.", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 11036, + "graphTooltip": 0, + "id": 1, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 64, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "refId": "A" + } + ], + "title": "$chain_id overview", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "gridPos": { + "h": 2, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 62, + "links": [], + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "", + "mode": "html" + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "refId": "A" + } + ], + "transparent": true, + "type": "text" + }, + { + "datasource": { + "uid": "$DS" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 3 + }, + "hideTimeOverride": false, + "id": 4, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "uid": "$DS" + }, + "expr": "tendermint_consensus_height{chain_id=\"$chain_id\", instance=\"$instance\"}", + "format": "time_series", + "hide": false, + "instant": true, + "interval": "30s", + "intervalFactor": 1, + "refId": "A" + } + ], + "title": "Block Height", + "type": "stat" + }, + { + "datasource": { + "uid": "$DS" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 3 + }, + "hideTimeOverride": false, + "id": 40, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "uid": "$DS" + }, + "expr": "tendermint_consensus_total_txs{chain_id=\"$chain_id\", instance=\"$instance\"}", + "format": "time_series", + "interval": "30s", + "intervalFactor": 1, + "refId": "A" + } + ], + "title": "Total Transactions", + "type": "stat" + }, + { + "datasource": { + "uid": "$DS" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 3 + }, + "hideTimeOverride": true, + "id": 39, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "uid": "$DS" + }, + "expr": "tendermint_consensus_block_interval_seconds{chain_id=\"$chain_id\", instance=\"$instance\"}", + "format": "time_series", + "interval": "30s", + "intervalFactor": 1, + "refId": "A" + } + ], + "timeFrom": "1h", + "title": "Avg Block Time", + "type": "stat" + }, + { + "datasource": { + "uid": "$DS" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 3 + }, + "hideTimeOverride": false, + "id": 47, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "uid": "$DS" + }, + "expr": "tendermint_consensus_validators_power{chain_id=\"$chain_id\", instance=\"$instance\"}", + "format": "time_series", + "instant": false, + "interval": "30s", + "intervalFactor": 1, + "refId": "A" + } + ], + "title": "Bonded Tokens", + "type": "stat" + }, + { + "aliasColors": { + "Height for last 3 hours": "#447ebc", + "Total Transactions for last 3 hours": "#ef843c" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$DS" + }, + "decimals": 0, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 3, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 7 + }, + "hiddenSeries": false, + "hideTimeOverride": false, + "id": 15, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 350, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.2.2", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$DS" + }, + "expr": "tendermint_consensus_validators{chain_id=\"$chain_id\", instance=\"$instance\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "Active", + "refId": "A" + }, + { + "datasource": { + "uid": "$DS" + }, + "expr": "tendermint_consensus_missing_validators{chain_id=\"$chain_id\", instance=\"$instance\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Missing", + "refId": "B" + }, + { + "datasource": { + "uid": "$DS" + }, + "expr": "tendermint_consensus_byzantine_validators{chain_id=\"$chain_id\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Byzantine", + "refId": "C" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Validators", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 0, + "format": "locale", + "label": "", + "logBase": 1, + "min": "0", + "show": true + }, + { + "format": "none", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "Height for last 3 hours": "#447ebc", + "Total Transactions for last 3 hours": "#ef843c" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$DS" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 3, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 7 + }, + "hiddenSeries": false, + "hideTimeOverride": false, + "id": 48, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sideWidth": 350, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.2.2", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$DS" + }, + "expr": "tendermint_consensus_validators_power{chain_id=\"$chain_id\", instance=\"$instance\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "Online", + "refId": "A" + }, + { + "datasource": { + "uid": "$DS" + }, + "expr": "tendermint_consensus_missing_validators_power{chain_id=\"$chain_id\", instance=\"$instance\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Missing", + "refId": "B" + }, + { + "datasource": { + "uid": "$DS" + }, + "expr": "tendermint_consensus_byzantine_validators_power{chain_id=\"$chain_id\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Byzantine", + "refId": "C" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Voting Power", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 0, + "format": "short", + "label": "", + "logBase": 1, + "min": "0", + "show": true + }, + { + "format": "none", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "Height for last 3 hours": "#447ebc", + "Total Transactions for last 3 hours": "#ef843c" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$DS" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 3, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 16 + }, + "hiddenSeries": false, + "hideTimeOverride": false, + "id": 49, + "legend": { + "alignAsTable": false, + "avg": true, + "current": false, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.2.2", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$DS" + }, + "expr": "tendermint_consensus_block_size_bytes{chain_id=\"$chain_id\", instance=\"$instance\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "Block Size", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Block Size", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 2, + "format": "bytes", + "label": "", + "logBase": 1, + "min": "0", + "show": true + }, + { + "format": "none", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "Height for last 3 hours": "#447ebc", + "Total Transactions for last 3 hours": "#ef843c" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$DS" + }, + "decimals": 0, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 3, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 16 + }, + "hiddenSeries": false, + "hideTimeOverride": false, + "id": 50, + "legend": { + "alignAsTable": false, + "avg": true, + "current": false, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": true, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.2.2", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$DS" + }, + "expr": "tendermint_consensus_num_txs{chain_id=\"$chain_id\", instance=\"$instance\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "Transactions", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Transactions", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 0, + "format": "short", + "label": "", + "logBase": 1, + "min": "0", + "show": true + }, + { + "format": "none", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 21 + }, + "id": 55, + "panels": [], + "repeat": "instance", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "refId": "A" + } + ], + "title": "instance overview: $instance", + "type": "row" + }, + { + "datasource": { + "uid": "$DS" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "max": 20, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#e24d42", + "value": null + }, + { + "color": "#ef843c", + "value": 2 + }, + { + "color": "#7eb26d", + "value": 5 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 22 + }, + "hideTimeOverride": true, + "id": 53, + "links": [], + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "uid": "$DS" + }, + "expr": "tendermint_p2p_peers{chain_id=\"$chain_id\", instance=~\"$instance\"}", + "format": "time_series", + "instant": true, + "interval": "30s", + "intervalFactor": 1, + "refId": "A" + } + ], + "title": "Connected Peers", + "type": "gauge" + }, + { + "datasource": { + "uid": "$DS" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "max": 50, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#7eb26d", + "value": null + }, + { + "color": "#ef843c", + "value": 10 + }, + { + "color": "#e24d42", + "value": 20 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 22 + }, + "hideTimeOverride": true, + "id": 56, + "links": [], + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "uid": "$DS" + }, + "expr": "tendermint_mempool_size{chain_id=\"$chain_id\", instance=~\"$instance\"}", + "format": "time_series", + "instant": true, + "interval": "30s", + "intervalFactor": 1, + "refId": "A" + } + ], + "title": "Unconfirmed Transactions", + "type": "gauge" + }, + { + "datasource": { + "uid": "$DS" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 22 + }, + "hideTimeOverride": true, + "id": 60, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "uid": "$DS" + }, + "expr": "tendermint_mempool_failed_txs{chain_id=\"$chain_id\", instance=~\"$instance\"}", + "format": "time_series", + "instant": true, + "interval": "30s", + "intervalFactor": 1, + "refId": "A" + } + ], + "title": "Failed Transactions", + "type": "stat" + }, + { + "datasource": { + "uid": "$DS" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 22 + }, + "hideTimeOverride": true, + "id": 61, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "uid": "$DS" + }, + "expr": "tendermint_mempool_recheck_times{chain_id=\"$chain_id\", instance=~\"$instance\"}", + "format": "time_series", + "instant": true, + "interval": "30s", + "intervalFactor": 1, + "refId": "A" + } + ], + "title": "Recheck Times", + "type": "stat" + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$DS" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 26 + }, + "hiddenSeries": false, + "id": 59, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": false, + "total": false, + "values": false + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.2.2", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$DS" + }, + "expr": "tendermint_p2p_peer_receive_bytes_total{chain_id=\"$chain_id\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{peer_id}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Total Network Input", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "series", + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "bytes", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$DS" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 26 + }, + "hiddenSeries": false, + "id": 58, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": false, + "total": false, + "values": false + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.2.2", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$DS" + }, + "expr": "tendermint_p2p_peer_send_bytes_total{chain_id=\"$chain_id\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{peer_id}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Total Network Output", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "series", + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "bytes", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + } + ], + "refresh": "", + "schemaVersion": 38, + "tags": [ + "Blockchain", + "Cosmos" + ], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "Prometheus", + "value": "PBFA97CFB590B2093" + }, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "DS", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": { + "selected": false, + "text": "athens_101-1", + "value": "athens_101-1" + }, + "datasource": { + "uid": "$DS" + }, + "definition": "label_values(tendermint_consensus_height, chain_id)", + "hide": 0, + "includeAll": false, + "label": "Chain ID", + "multi": false, + "name": "chain_id", + "options": [], + "query": "label_values(tendermint_consensus_height, chain_id)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": "", + "current": { + "selected": false, + "text": "172.20.0.11:26660", + "value": "172.20.0.11:26660" + }, + "datasource": { + "uid": "$DS" + }, + "definition": "label_values(tendermint_consensus_height{chain_id=\"$chain_id\"}, instance)", + "hide": 0, + "includeAll": false, + "label": "Instance", + "multi": false, + "name": "instance", + "options": [], + "query": "label_values(tendermint_consensus_height{chain_id=\"$chain_id\"}, instance)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 5, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now/d", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "Cosmos Dashboard", + "uid": "UJyurCTWz", + "version": 1, + "weekStart": "" +} \ No newline at end of file diff --git a/contrib/localnet/grafana/dashboards/default.yaml b/contrib/localnet/grafana/dashboards/default.yaml new file mode 100644 index 0000000000..581a362406 --- /dev/null +++ b/contrib/localnet/grafana/dashboards/default.yaml @@ -0,0 +1,8 @@ +apiVersion: 1 + +providers: + - name: Default # A uniquely identifiable name for the provider + folder: Dashboards # The folder where to place the dashboards + type: file + options: + path: /etc/grafana/provisioning/dashboards # Path to dashboard files on disk (required) \ No newline at end of file diff --git a/contrib/localnet/grafana/dashboards/eth_balance.json b/contrib/localnet/grafana/dashboards/eth_balance.json new file mode 100644 index 0000000000..7cafe4c4d9 --- /dev/null +++ b/contrib/localnet/grafana/dashboards/eth_balance.json @@ -0,0 +1,955 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "Graph Ethereum Wallet Balances", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 6970, + "graphTooltip": 0, + "id": 4, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 0, + "y": 0 + }, + "id": 3, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "eth_total_addresses", + "format": "time_series", + "intervalFactor": 1, + "refId": "A" + } + ], + "title": "Total Addresses Logged", + "type": "stat" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 16, + "x": 4, + "y": 0 + }, + "hiddenSeries": false, + "id": 6, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.2.2", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "topk(5, eth_balance)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{name}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Top 5 Balances", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#299c46", + "value": null + }, + { + "color": "#fce2de", + "value": 0 + }, + { + "color": "#d44a3a", + "value": 100 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 20, + "y": 0 + }, + "id": 11, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "(eth_balance_total - eth_balance_total offset 1m) / eth_balance_total", + "format": "time_series", + "instant": false, + "intervalFactor": 1, + "refId": "A" + } + ], + "title": "Total ETH 1 Hour Change", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "dtdurations" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 0, + "y": 4 + }, + "id": 2, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "eth_load_seconds", + "format": "time_series", + "intervalFactor": 1, + "refId": "A" + } + ], + "title": "Total Load Time", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#299c46", + "value": null + }, + { + "color": "#fce2de", + "value": 0 + }, + { + "color": "#d44a3a", + "value": 100 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 20, + "y": 4 + }, + "id": 12, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "(eth_balance_total - eth_balance_total offset 24h) / eth_balance_total", + "format": "time_series", + "instant": false, + "intervalFactor": 1, + "refId": "A" + } + ], + "title": "Total ETH 24 Hour Change", + "type": "stat" + }, + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 8 + }, + "id": 14, + "links": [], + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "