Grafana dashboard: Substrate prometeus metrics
Description: A simple prometheus logger

Substrate/PolkaDOT Prometheus scrapper with curl and custom logging to the journaled system

Github: https://github.com/ksmnetwork/polkadot-prometheus-logger

For Support && Nominations in KUSAMA NETWORK: Validators Display name. KSMNETWORK

KUSAMA (KSM) Address H1bSKJxoxzxYRCdGQutVqFGeW7xU3AcN6vyEdZBU7Qb1rsZ

OR

PolkaDOT (DOT) Address: 15FxvBFDd3X7H9qcMGqsiuvFYEg4D3mBoTA2LQufreysTHKA

{
  "__inputs": [
    {
      "name": "DS_GRAFANACLOUD-KSMNETWORK-LOGS",
      "label": "Loki Data Source",
      "description": "Native Plugin",
      "type": "datasource",
      "pluginId": "loki",
      "pluginName": "Loki"
    }
  ],
  "__elements": [],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.3.5"
    },
    {
      "type": "datasource",
      "id": "loki",
      "name": "Loki",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- 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": null,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "datasource": {
        "type": "loki",
        "uid": "${DS_GRAFANACLOUD-KSMNETWORK-LOGS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "displayMode": "auto"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "counter (changeCount)"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 182
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "time (last)"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 209
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Time (last)"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 205
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Metrics (last)"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 290
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Counter (last)"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 169
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Metrics"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 898
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Counter"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 739
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 41,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 2,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Counter"
          }
        ]
      },
      "pluginVersion": "8.3.5",
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "${DS_GRAFANACLOUD-KSMNETWORK-LOGS}"
          },
          "expr": "{unit=\"metrics.service\"} | regexp \"(?P<metric>^[a-zA-Z0-9_]+)(?P<json>\\\\{([^}]+)\\\\})\\\\W(?P<counter>[0-9]+)\"",
          "refId": "A"
        }
      ],
      "transformations": [
        {
          "id": "labelsToFields",
          "options": {
            "keepLabels": [
              "metric",
              "counter",
              "json"
            ],
            "mode": "columns"
          }
        },
        {
          "id": "merge",
          "options": {}
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "id": false,
              "line": false,
              "traceID": true,
              "tsNs": true
            },
            "indexByName": {
              "counter": 5,
              "id": 2,
              "line": 1,
              "metric": 6,
              "traceID": 4,
              "ts": 0,
              "tsNs": 3
            },
            "renameByName": {
              "counter": "Counter",
              "id": "ID",
              "json": "JSON",
              "line": "Line",
              "metric": "Metrics",
              "traceID": "",
              "ts": "Time"
            }
          }
        },
        {
          "id": "groupBy",
          "options": {
            "fields": {
              "Counter": {
                "aggregations": [
                  "last"
                ],
                "operation": "aggregate"
              },
              "ID": {
                "aggregations": [
                  "last"
                ],
                "operation": "aggregate"
              },
              "JSON": {
                "aggregations": [
                  "last"
                ],
                "operation": "aggregate"
              },
              "Metrics": {
                "aggregations": [
                  "last"
                ],
                "operation": "groupby"
              },
              "Time": {
                "aggregations": [
                  "last"
                ],
                "operation": "aggregate"
              },
              "counter": {
                "aggregations": [
                  "changeCount"
                ],
                "operation": "aggregate"
              },
              "id": {
                "aggregations": [
                  "last"
                ]
              },
              "json": {
                "aggregations": [
                  "last"
                ],
                "operation": "aggregate"
              },
              "metric": {
                "aggregations": [],
                "operation": "groupby"
              },
              "time": {
                "aggregations": [
                  "last"
                ],
                "operation": "aggregate"
              }
            }
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "ID": true,
              "ID (last)": true,
              "JSON (last)": true,
              "Time (last)": false
            },
            "indexByName": {
              "Counter (last)": 2,
              "JSON (last)": 3,
              "Metrics": 1,
              "Time (last)": 0
            },
            "renameByName": {
              "Counter (last)": "Counter",
              "ID (last)": "id",
              "JSON (last)": "JSON",
              "Metrics": "Metrics",
              "Metrics (last)": "Metrics",
              "Time (last)": "Time"
            }
          }
        }
      ],
      "type": "table"
    }
  ],
  "refresh": "10s",
  "schemaVersion": 34,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-1m",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "Substrate prometeus metrics",
  "uid": "fcVwwV-nz",
  "version": 6,
  "weekStart": "",
  "gnetId": 15674,
  "description": "A simple prometheus logger"
}