bee-monitor
monitor for swarm bee node
{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.0.3"
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 14602,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1624258264761,
  "links": [],
  "panels": [
    {
      "collapsed": false,
      "datasource": null,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 333,
      "panels": [],
      "title": "物理机-overview",
      "type": "row"
    },
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "center",
            "displayMode": "auto",
            "filterable": true
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "总连接节点数"
            },
            "properties": [
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "red",
                      "value": null
                    },
                    {
                      "color": "orange",
                      "value": 500
                    },
                    {
                      "color": "yellow",
                      "value": 1000
                    },
                    {
                      "color": "green",
                      "value": 1500
                    }
                  ]
                }
              },
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "max",
                "value": 1500
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "总存储容量"
            },
            "properties": [
              {
                "id": "unit",
                "value": "decmbytes"
              },
              {
                "id": "max",
                "value": 500000
              },
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "red",
                      "value": null
                    },
                    {
                      "color": "orange",
                      "value": 200000
                    },
                    {
                      "color": "yellow",
                      "value": 300000
                    },
                    {
                      "color": "green",
                      "value": 400000
                    }
                  ]
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 10,
        "w": 22,
        "x": 0,
        "y": 1
      },
      "id": 166,
      "options": {
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "总存储容量"
          }
        ]
      },
      "pluginVersion": "8.0.3",
      "targets": [
        {
          "exemplar": true,
          "expr": "bee_info{}",
          "format": "time_series",
          "hide": false,
          "instant": true,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "B"
        }
      ],
      "title": "物理机-overview",
      "transformations": [
        {
          "id": "reduce",
          "options": {
            "includeTimeField": false,
            "mode": "reduceFields",
            "reducers": [
              "last"
            ]
          }
        },
        {
          "id": "labelsToFields",
          "options": {
            "valueLabel": "info_type"
          }
        },
        {
          "id": "groupBy",
          "options": {
            "fields": {
              "bee_1634_value": {
                "aggregations": [
                  "sum"
                ],
                "operation": "aggregate"
              },
              "bee_cashout_count": {
                "aggregations": [
                  "sum"
                ],
                "operation": "aggregate"
              },
              "bee_cashout_money": {
                "aggregations": [
                  "sum"
                ],
                "operation": "aggregate"
              },
              "bee_cpu_value": {
                "aggregations": [
                  "sum"
                ],
                "operation": "aggregate"
              },
              "bee_hard_disk_value": {
                "aggregations": [
                  "sum"
                ],
                "operation": "aggregate"
              },
              "bee_peer_length": {
                "aggregations": [
                  "sum"
                ],
                "operation": "aggregate"
              },
              "bee_ram_value": {
                "aggregations": [
                  "sum"
                ],
                "operation": "aggregate"
              },
              "docker_port": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "host_id": {
                "aggregations": [],
                "operation": "groupby"
              }
            }
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "instance": true,
              "job": true
            },
            "indexByName": {
              "bee_1634_value (sum)": 2,
              "bee_cashout_count (sum)": 3,
              "bee_cashout_money (sum)": 4,
              "bee_cpu_value (sum)": 7,
              "bee_hard_disk_value (sum)": 6,
              "bee_peer_length (sum)": 5,
              "bee_ram_value (sum)": 8,
              "docker_port (count)": 1,
              "host_id": 0
            },
            "renameByName": {
              "bee_1634_value (sum)": "",
              "bee_cashout_count (sum)": "总兑换次数",
              "bee_cashout_money (sum)": "总gBZZ",
              "bee_hard_disk_value (sum)": "总存储容量",
              "bee_peer_length (sum)": "总连接节点数",
              "chequebook_address": "",
              "docker_port (count)": "Docker数量",
              "host_id": "",
              "instance": "",
              "job": ""
            }
          }
        }
      ],
      "transparent": true,
      "type": "table"
    },
    {
      "collapsed": false,
      "datasource": null,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 11
      },
      "id": 331,
      "panels": [],
      "title": "节点-overview",
      "type": "row"
    },
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "center",
            "displayMode": "auto",
            "filterable": true
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "chequebook_address"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "json-view"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "node_address"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "json-view"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "bee_peer_length"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "连接节点数"
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "red",
                      "value": null
                    },
                    {
                      "color": "#EAB839",
                      "value": 100
                    },
                    {
                      "color": "green",
                      "value": 200
                    }
                  ]
                }
              },
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "max",
                "value": 300
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "bee_hard_disk_value"
            },
            "properties": [
              {
                "id": "unit",
                "value": "decmbytes"
              },
              {
                "id": "max",
                "value": 100000
              },
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "displayName",
                "value": "存储空间"
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "red",
                      "value": null
                    },
                    {
                      "color": "orange",
                      "value": 30000
                    },
                    {
                      "color": "yellow",
                      "value": 70000
                    },
                    {
                      "color": "green",
                      "value": 100000
                    }
                  ]
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "bee_cashout_count"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 100
              },
              {
                "id": "displayName",
                "value": "兑换次数"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "bee_cashout_money"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "gBZZ"
              },
              {
                "id": "custom.width",
                "value": 110
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "bee_cashout_money"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 116
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 12,
        "w": 22,
        "x": 0,
        "y": 12
      },
      "id": 10,
      "options": {
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "存储空间"
          }
        ]
      },
      "pluginVersion": "8.0.3",
      "repeat": null,
      "targets": [
        {
          "exemplar": true,
          "expr": "bee_info{}",
          "format": "time_series",
          "hide": false,
          "instant": true,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "B"
        }
      ],
      "title": "节点-overview",
      "transformations": [
        {
          "id": "reduce",
          "options": {
            "includeTimeField": false,
            "mode": "reduceFields",
            "reducers": [
              "last"
            ]
          }
        },
        {
          "id": "labelsToFields",
          "options": {
            "valueLabel": "info_type"
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "instance": true,
              "job": true
            },
            "indexByName": {
              "bee_1634_value": 8,
              "bee_cashout_count": 2,
              "bee_cashout_money": 3,
              "bee_cpu_value": 6,
              "bee_file_ulimit": 9,
              "bee_hard_disk_value": 5,
              "bee_peer_length": 4,
              "bee_ram_value": 7,
              "bee_version": 12,
              "chequebook_address": 10,
              "docker_port": 1,
              "host_id": 0,
              "instance": 13,
              "job": 14,
              "node_address": 11
            },
            "renameByName": {
              "chequebook_address": "",
              "host_id": "",
              "instance": "",
              "job": ""
            }
          }
        }
      ],
      "transparent": true,
      "type": "table"
    },
    {
      "collapsed": false,
      "datasource": null,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 24
      },
      "id": 329,
      "panels": [],
      "repeat": "docker_port",
      "title": "单节点（host_id: $host_id, docker_port: $docker_port)",
      "type": "row"
    },
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 20,
            "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",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 8,
        "x": 0,
        "y": 25
      },
      "id": 340,
      "options": {
        "legend": {
          "calcs": [
            "last"
          ],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "pluginVersion": "8.0.3",
      "targets": [
        {
          "exemplar": true,
          "expr": "bee_info{host_id=~\"$host_id\",docker_port=~\"$docker_port\",info_type=~\"bee_cashout_money\"}",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "gBZZ",
          "refId": "A"
        }
      ],
      "title": "gBZZ",
      "transparent": true,
      "type": "timeseries"
    },
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 11,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineStyle": {
              "fill": "solid"
            },
            "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",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "__systemRef": "hideSeriesFrom",
            "matcher": {
              "id": "byNames",
              "options": {
                "mode": "exclude",
                "names": [
                  "peer length"
                ],
                "prefix": "All except:",
                "readOnly": true
              }
            },
            "properties": [
              {
                "id": "custom.hideFrom",
                "value": {
                  "legend": false,
                  "tooltip": false,
                  "viz": true
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 4,
        "w": 8,
        "x": 0,
        "y": 29
      },
      "id": 6,
      "options": {
        "legend": {
          "calcs": [
            "last"
          ],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "pluginVersion": "8.0.3",
      "repeat": null,
      "targets": [
        {
          "exemplar": true,
          "expr": "bee_info{host_id=~\"$host_id\",docker_port=~\"$docker_port\",info_type=~\"bee_peer_length\"}",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "peer length",
          "refId": "A"
        }
      ],
      "title": "peer length",
      "transparent": true,
      "type": "timeseries"
    },
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 20,
            "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",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "decmbytes"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 8,
        "x": 0,
        "y": 33
      },
      "id": 7,
      "options": {
        "legend": {
          "calcs": [
            "last"
          ],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "pluginVersion": "8.0.3",
      "repeat": null,
      "targets": [
        {
          "exemplar": true,
          "expr": "bee_info{host_id=~\"$host_id\",docker_port=~\"$docker_port\",info_type=~\"bee_hard_disk_value\"}",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "存储空间",
          "refId": "A"
        }
      ],
      "title": "存储空间",
      "transparent": true,
      "type": "timeseries"
    },
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 20,
            "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",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 8,
        "x": 0,
        "y": 37
      },
      "id": 8,
      "options": {
        "legend": {
          "calcs": [
            "last"
          ],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "pluginVersion": "8.0.3",
      "repeat": null,
      "targets": [
        {
          "exemplar": true,
          "expr": "bee_info{host_id=~\"$host_id\",docker_port=~\"$docker_port\",info_type=~\"bee_cpu_value\"}",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "cpu",
          "refId": "A"
        }
      ],
      "title": "cpu",
      "transparent": true,
      "type": "timeseries"
    },
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 20,
            "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",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 8,
        "x": 0,
        "y": 41
      },
      "id": 5,
      "options": {
        "legend": {
          "calcs": [
            "last"
          ],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "pluginVersion": "8.0.3",
      "repeat": null,
      "targets": [
        {
          "exemplar": true,
          "expr": "bee_info{host_id=~\"$host_id\",docker_port=~\"$docker_port\",info_type=~\"bee_ram_value\"}",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "ram",
          "refId": "A"
        }
      ],
      "title": "ram",
      "transparent": true,
      "type": "timeseries"
    },
    {
      "collapsed": false,
      "datasource": null,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 108
      },
      "id": 327,
      "panels": [],
      "title": "Row title",
      "type": "row"
    }
  ],
  "refresh": "5s",
  "schemaVersion": 30,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "definition": "label_values(bee_info{}, host_id)",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "host_id",
        "options": [],
        "query": {
          "query": "label_values(bee_info{}, host_id)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "definition": "label_values(bee_info{host_id=~\"$host_id\"}, docker_port)",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "docker_port",
        "options": [],
        "query": {
          "query": "label_values(bee_info{host_id=~\"$host_id\"}, docker_port)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 3,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-3h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "bee-monitor",
  "uid": "YmCslER7z",
  "version": 40,
  "description": "monitor for swarm bee node"
}