HugoByte/DIVE

grafana doesn't show data for moonbeam parachain in localnet

Closed this issue · 2 comments

Overview

grafana doesn't show data for moonbeam parachain

Steps to Reproduce

Steps to reproduce the behavior:

  1. run dive chain polkadot -p moonbeam --explorer --metrics
  2. Open grafana, configure and observe

Expected Behavior

To show height of all running nodes including para and relaychain.

Screenshots

Grafana :
image

Services json to show metrics is enabled for all :

{
  "grafana": {
    "service_name": "grafana",
    "endpoint_public": "http://127.0.0.1:35419",
    "endpoint": "http://172.16.0.13:3000"
  },
  "moonbeam-alice-localnet": {
    "service_name": "moonbeam-alice-localnet",
    "endpoint_public": "ws://127.0.0.1:61779",
    "endpoint": "ws://172.16.0.10:9946",
    "endpoint_prometheus": "tcp://127.0.0.1:3860",
    "prometheus": true,
    "ip_address": "172.16.0.10",
    "prometheus_port": 9615,
    "prometheus_public_port": 3860
  },
  "polkadot-js-explorer": {
    "service_name": "polkadot-js-explorer",
    "endpoint_public": "http://127.0.0.1:80",
    "endpoint": "http://172.16.0.14:80"
  },
  "prometheus": {
    "service_name": "prometheus",
    "endpoint_public": "http://127.0.0.1:58199",
    "endpoint": "http://172.16.0.12:9090"
  },
  "rococo-local-alice": {
    "service_name": "rococo-local-alice",
    "endpoint_public": "ws://127.0.0.1:13981",
    "endpoint": "ws://172.16.0.5:9944",
    "endpoint_prometheus": "tcp://127.0.0.1:53561",
    "prometheus": true,
    "ip_address": "172.16.0.5",
    "prometheus_port": 9615,
    "prometheus_public_port": 53561
  },
  "rococo-local-bob": {
    "service_name": "rococo-local-bob",
    "endpoint_public": "ws://127.0.0.1:23889",
    "endpoint": "ws://172.16.0.4:9944",
    "endpoint_prometheus": "tcp://127.0.0.1:45034",
    "prometheus": true,
    "ip_address": "172.16.0.4",
    "prometheus_port": 9615,
    "prometheus_public_port": 45034
  }
}

@hemz10 Please use this config for moonriver/moonbeam parachain.

{
    "__inputs": [
      {
        "name": "DS_SUBSTRATE_NODE",
        "label": "Substrate Node",
        "description": "",
        "type": "datasource",
        "pluginId": "prometheus",
        "pluginName": "Prometheus"
      }
    ],
    "__requires": [
      {
        "type": "grafana",
        "id": "grafana",
        "name": "Grafana",
        "version": "7.3.6"
      },
      {
        "type": "panel",
        "id": "graph",
        "name": "Graph",
        "version": ""
      },
      {
        "type": "datasource",
        "id": "prometheus",
        "name": "Prometheus",
        "version": "1.0.0"
      },
      {
        "type": "panel",
        "id": "stat",
        "name": "Stat",
        "version": ""
      }
    ],
    "annotations": {
      "list": [
        {
          "builtIn": 1,
          "datasource": "-- Grafana --",
          "enable": true,
          "hide": true,
          "iconColor": "rgba(0, 211, 255, 1)",
          "name": "Annotations & Alerts",
          "type": "dashboard"
        }
      ]
    },
    "description": "Grafana dashboard for substrate template metrics. Instructions on use: https://docs.substrate.io//tutorials/build-a-blockchain/monitor-node-metrics/",
    "editable": true,
    "gnetId": 11784,
    "graphTooltip": 0,
    "id": null,
    "links": [],
    "panels": [
      {
        "datasource": "${DS_SUBSTRATE_NODE}",
        "description": "What your node sees as the highest block (NOT finalized)",
        "fieldConfig": {
          "defaults": {
            "custom": {},
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "super-light-yellow",
                  "value": null
                }
              ]
            }
          },
          "overrides": []
        },
        "id": 12,
        "options": {
          "colorMode": "value",
          "graphMode": "none",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": ["last"],
            "fields": "/^Height\\(best\\)$/",
            "values": false
          },
          "textMode": "auto"
        },
        "pluginVersion": "7.3.6",
        "targets": [
          {
            "expr": "moonbeam_substrate_block_height{status=\"best\"}",
            "interval": "",
            "legendFormat": "Height(best)",
            "refId": "A"
          }
        ],
        "timeFrom": null,
        "timeShift": null,
        "title": "Block Height (best)",
        "type": "stat"
      },
      {
        "datasource": "${DS_SUBSTRATE_NODE}",
        "description": "What your node sees as the highest finalized block ( less than or equal to best)",
        "fieldConfig": {
          "defaults": {
            "custom": {},
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            }
          },
          "overrides": []
        },
        "gridPos": {
          "h": 3,
          "w": 6,
          "x": 6,
          "y": 0
        },
        "id": 13,
        "options": {
          "colorMode": "value",
          "graphMode": "none",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": ["last"],
            "fields": "",
            "values": false
          },
          "textMode": "value"
        },
        "pluginVersion": "7.3.6",
        "targets": [
          {
            "expr": "moonbeam_substrate_block_height{status=\"finalized\"}",
            "interval": "",
            "legendFormat": "Height(finalized)",
            "refId": "A"
          }
        ],
        "timeFrom": null,
        "timeShift": null,
        "title": "Block Height (finalized)",
        "type": "stat"
      },
      {
        "datasource": "${DS_SUBSTRATE_NODE}",
        "description": "Total transactions in best block",
        "fieldConfig": {
          "defaults": {
            "custom": {},
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "yellow",
                  "value": 100
                }
              ]
            }
          },
          "overrides": []
        },
        "gridPos": {
          "h": 3,
          "w": 6,
          "x": 0,
          "y": 3
        },
        "id": 16,
        "options": {
          "colorMode": "value",
          "graphMode": "area",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": ["last"],
            "fields": "",
            "values": false
          },
          "textMode": "auto"
        },
        "pluginVersion": "7.3.6",
        "targets": [
          {
            "expr": "moonbeam_substrate_proposer_number_of_transactions",
            "interval": "",
            "legendFormat": "Height(best)",
            "refId": "A"
          }
        ],
        "timeFrom": null,
        "timeShift": null,
        "title": "Block Total Tx",
        "type": "stat"
      },
      {
        "datasource": "${DS_SUBSTRATE_NODE}",
        "description": "What your node sees as the highest finalized block ( less than or equal to best)",
        "fieldConfig": {
          "defaults": {
            "custom": {},
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "yellow",
                  "value": 500000
                },
                {
                  "color": "red",
                  "value": 1000000
                }
              ]
            },
            "unit": "decbytes"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 3,
          "w": 6,
          "x": 6,
          "y": 3
        },
        "id": 17,
        "options": {
          "colorMode": "value",
          "graphMode": "area",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": ["last"],
            "fields": "",
            "values": false
          },
          "textMode": "value"
        },
        "pluginVersion": "7.3.6",
        "targets": [
          {
            "expr": "moonbeam_substrate_state_cache_bytes",
            "format": "time_series",
            "interval": "",
            "legendFormat": "Size (bytes)",
            "refId": "A"
          }
        ],
        "timeFrom": null,
        "timeShift": null,
        "title": "State Cashe (bytes)",
        "type": "stat"
      },
      {
        "aliasColors": {},
        "bars": true,
        "dashLength": 10,
        "dashes": false,
        "datasource": "${DS_SUBSTRATE_NODE}",
        "description": "Number of connected peers",
        "fieldConfig": {
          "defaults": {
            "custom": {},
            "links": [],
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "red",
                  "value": 80
                }
              ]
            }
          },
          "overrides": []
        },
        "fill": 1,
        "fillGradient": 0,
        "gridPos": {
          "h": 8,
          "w": 12,
          "x": 0,
          "y": 6
        },
        "hiddenSeries": false,
        "id": 10,
        "legend": {
          "alignAsTable": true,
          "avg": true,
          "current": true,
          "max": true,
          "min": true,
          "show": true,
          "total": false,
          "values": true
        },
        "lines": true,
        "linewidth": 1,
        "nullPointMode": "null",
        "options": {
          "alertThreshold": true
        },
        "percentage": false,
        "pluginVersion": "7.3.6",
        "pointradius": 2,
        "points": true,
        "renderer": "flot",
        "seriesOverrides": [],
        "spaceLength": 10,
        "stack": false,
        "steppedLine": false,
        "targets": [
          {
            "expr": "moonbeam_substrate_sub_libp2p_peers_count",
            "instant": false,
            "interval": "",
            "legendFormat": "Number of network gossip peers",
            "refId": "A"
          }
        ],
        "thresholds": [],
        "timeFrom": null,
        "timeRegions": [],
        "timeShift": null,
        "title": "LibP2P peers",
        "tooltip": {
          "shared": true,
          "sort": 0,
          "value_type": "individual"
        },
        "type": "graph",
        "xaxis": {
          "buckets": null,
          "mode": "time",
          "name": null,
          "show": true,
          "values": []
        },
        "yaxes": [
          {
            "$$hashKey": "object:673",
            "decimals": 0,
            "format": "none",
            "label": "Peers",
            "logBase": 1,
            "max": null,
            "min": "0",
            "show": true
          },
          {
            "$$hashKey": "object:674",
            "format": "short",
            "label": null,
            "logBase": 1,
            "max": null,
            "min": null,
            "show": true
          }
        ],
        "yaxis": {
          "align": false,
          "alignLevel": null
        }
      },
      {
        "aliasColors": {},
        "bars": false,
        "dashLength": 10,
        "dashes": false,
        "datasource": "${DS_SUBSTRATE_NODE}",
        "description": "histogram 90th quantiles for time to construct a block (seconds) More info: https://prometheus.io/docs/prometheus/latest/querying/functions/#histogram_quantile",
        "fieldConfig": {
          "defaults": {
            "custom": {
              "align": null,
              "filterable": false
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "red",
                  "value": 80
                }
              ]
            }
          },
          "overrides": []
        },
        "fill": 1,
        "fillGradient": 8,
        "gridPos": {
          "h": 8,
          "w": 12,
          "x": 0,
          "y": 14
        },
        "hiddenSeries": false,
        "id": 15,
        "legend": {
          "avg": false,
          "current": false,
          "max": false,
          "min": false,
          "show": true,
          "total": false,
          "values": false
        },
        "lines": true,
        "linewidth": 1,
        "nullPointMode": "null",
        "options": {
          "alertThreshold": true
        },
        "percentage": false,
        "pluginVersion": "7.3.6",
        "pointradius": 2,
        "points": false,
        "renderer": "flot",
        "seriesOverrides": [],
        "spaceLength": 10,
        "stack": false,
        "steppedLine": false,
        "targets": [
          {
            "expr": "histogram_quantile(0.90, sum(rate(moonbeam_substrate_proposer_block_constructed_bucket[5m])) by (le))",
            "format": "time_series",
            "instant": false,
            "interval": "",
            "legendFormat": "90th quantile for block construction time (s)",
            "refId": "A"
          }
        ],
        "thresholds": [],
        "timeFrom": null,
        "timeRegions": [],
        "timeShift": null,
        "title": "Proposer Block Construction Time",
        "tooltip": {
          "shared": true,
          "sort": 0,
          "value_type": "individual"
        },
        "type": "graph",
        "xaxis": {
          "buckets": null,
          "mode": "time",
          "name": null,
          "show": true,
          "values": []
        },
        "yaxes": [
          {
            "$$hashKey": "object:517",
            "format": "short",
            "label": "Time (s)",
            "logBase": 1,
            "max": null,
            "min": null,
            "show": true
          },
          {
            "$$hashKey": "object:518",
            "format": "short",
            "label": null,
            "logBase": 1,
            "max": null,
            "min": null,
            "show": true
          }
        ],
        "yaxis": {
          "align": false,
          "alignLevel": null
        }
      }
    ],
    "refresh": false,
    "schemaVersion": 26,
    "style": "dark",
    "tags": ["substrate", "blockchain", "node", "template", "polkadot", "kusama"],
    "templating": {
      "list": []
    },
    "time": {
      "from": "now-15m",
      "to": "now"
    },
    "timepicker": {
      "refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
    },
    "timezone": "",
    "title": "Substrate Node Template Metrics",
    "uid": "PUYzGbwWz",
    "version": 2
  }

Since the config is different for moonbeam closing this issue as fixed