Grafana dashboard: Lotus PubSub dashboard
Description: Dashboard to track Filecoin Lotus node stats.


{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "7.1.5"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "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",
        "type": "dashboard"
      }
    ]
  },
  "description": "Dashboard to track Filecoin Lotus node stats.",
  "editable": true,
  "gnetId": 13249,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1608725610599,
  "links": [],
  "panels": [
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": null
          },
          "links": [],
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 10,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "hiddenSeries": false,
      "id": 18,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "percentage": false,
      "pluginVersion": "7.1.5",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum(rate(lotus_pubsub_send_rpc{pod=~\"$pod\"}[5m])) by (pod)",
          "format": "time_series",
          "instant": false,
          "interval": "",
          "legendFormat": "{{ pod }}-send",
          "refId": "C"
        },
        {
          "expr": "sum(rate(lotus_pubsub_drop_rpc{pod=~\"$pod\"}[5m])) by (pod)",
          "format": "time_series",
          "instant": false,
          "interval": "",
          "legendFormat": "{{ pod }}-drop",
          "refId": "A"
        },
        {
          "expr": "sum(rate(lotus_pubsub_rejected{pod=~\"$pod\"}[5m])) by (pod)",
          "format": "time_series",
          "instant": false,
          "interval": "",
          "legendFormat": "{{ pod }}-rejected",
          "refId": "B"
        },
        {
          "expr": "sum(rate(lotus_pubsub_recv_rpc{pod=~\"$pod\"}[5m])) by (pod)",
          "format": "time_series",
          "instant": false,
          "interval": "",
          "legendFormat": "{{ pod }}-received",
          "refId": "D"
        },
        {
          "expr": "sum(rate(lotus_pubsub_delivered{pod=~\"$pod\"}[5m])) by (pod)",
          "format": "time_series",
          "instant": false,
          "interval": "",
          "legendFormat": "{{ pod }}-delivered",
          "refId": "E"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "PubSub historical data",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "transformations": [
        {
          "id": "seriesToColumns",
          "options": {
            "byField": "Time"
          }
        }
      ],
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": null
          },
          "links": [],
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Send"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": null
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 9,
        "w": 24,
        "x": 0,
        "y": 10
      },
      "id": 19,
      "options": {
        "frameIndex": 0,
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "7.1.5",
      "targets": [
        {
          "expr": "sum(rate(lotus_pubsub_send_rpc{pod=~\"$pod\"}[5m])) by (pod)",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "{{ pod }}",
          "refId": "C"
        },
        {
          "expr": "sum(rate(lotus_pubsub_drop_rpc{pod=~\"$pod\"}[5m])) by (pod)",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "{{ pod }}",
          "refId": "A"
        },
        {
          "expr": "sum(rate(lotus_pubsub_rejected{pod=~\"$pod\"}[5m])) by (pod)",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "{{ pod }}",
          "refId": "B"
        },
        {
          "expr": "sum(rate(lotus_pubsub_recv_rpc{pod=~\"$pod\"}[5m])) by (pod)",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "{{ pod }}",
          "refId": "D"
        },
        {
          "expr": "sum(rate(lotus_pubsub_delivered{pod=~\"$pod\"}[5m])) by (pod)",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "{{ pod }}",
          "refId": "E"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "PubSub data",
      "transformations": [
        {
          "id": "seriesToColumns",
          "options": {
            "byField": "pod"
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true,
              "pod": false
            },
            "indexByName": {},
            "renameByName": {
              "Value #A": "Drop",
              "Value #B": "Rejected",
              "Value #C": "Send",
              "Value #D": "Received",
              "Value #E": "Delivered",
              "pod": ""
            }
          }
        }
      ],
      "type": "table"
    }
  ],
  "refresh": "10s",
  "schemaVersion": 26,
  "style": "dark",
  "tags": [
    "lotus"
  ],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "definition": "lotus_pubsub_send_rpc",
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": false,
        "name": "pod",
        "options": [],
        "query": "lotus_pubsub_send_rpc",
        "refresh": 2,
        "regex": "/.*pod=\"(.*?)\"/",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-15m",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "Lotus PubSub dashboard",
  "uid": "cr5KSvpGk",
  "version": 1
}