Grafana dashboard: kubesphere


{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "panel",
      "id": "bargauge",
      "name": "Bar gauge",
      "version": ""
    },
    {
      "type": "panel",
      "id": "gauge",
      "name": "Gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "7.3.1"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "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"
      }
    ]
  },
  "editable": true,
  "gnetId": 13352,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "panels": [
    {
      "collapsed": false,
      "datasource": "${DS_PROMETHEUS}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 6,
      "panels": [],
      "title": "主机监控",
      "type": "row"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": null,
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "内存总量"
            },
            "properties": [
              {
                "id": "unit",
                "value": "bits"
              },
              {
                "id": "decimals",
                "value": 2
              },
              {
                "id": "custom.width",
                "value": 137
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "磁盘总量"
            },
            "properties": [
              {
                "id": "unit",
                "value": "bits"
              },
              {
                "id": "decimals",
                "value": 2
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "HOST"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 145
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "CPU使用率"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    },
                    {
                      "color": "#EAB839",
                      "value": 50
                    },
                    {
                      "color": "red",
                      "value": 80
                    }
                  ]
                }
              },
              {
                "id": "decimals",
                "value": 0
              },
              {
                "id": "unit",
                "value": "percent"
              },
              {
                "id": "custom.width",
                "value": 282
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "内存使用率"
            },
            "properties": [
              {
                "id": "unit",
                "value": "percent"
              },
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    },
                    {
                      "color": "#EAB839",
                      "value": 50
                    },
                    {
                      "color": "red",
                      "value": 80
                    }
                  ]
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "是否宕机"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "color-background"
              },
              {
                "id": "mappings",
                "value": [
                  {
                    "from": "",
                    "id": 1,
                    "text": "健康",
                    "to": "",
                    "type": 1,
                    "value": "1"
                  },
                  {
                    "from": "",
                    "id": 2,
                    "text": "宕机",
                    "to": "",
                    "type": 1,
                    "value": "0"
                  }
                ]
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "red",
                      "value": null
                    },
                    {
                      "color": "green",
                      "value": 1
                    }
                  ]
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 7,
        "w": 24,
        "x": 0,
        "y": 1
      },
      "id": 2,
      "options": {
        "showHeader": true,
        "sortBy": [
          {
            "desc": false,
            "displayName": "CPU 核数"
          }
        ]
      },
      "pluginVersion": "7.3.1",
      "targets": [
        {
          "expr": "count(node_cpu_seconds_total{mode='system' ,job=\"node-exporter\" }) by (instance)",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "CPU 核数",
          "refId": "A"
        },
        {
          "expr": "node_memory_MemTotal_bytes - 0 ",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "内存总量",
          "refId": "B"
        },
        {
          "expr": "sum({fstype=~\"ext4|xfs\", job=\"\"})by (instance)",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "磁盘总量",
          "refId": "C"
        },
        {
          "expr": "100 - (avg(irate(node_cpu_seconds_total{mode=\"idle\"}[5m]))by (instance) * 100)",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "CPU使用率",
          "refId": "D"
        },
        {
          "expr": "(1 - (node_memory_MemAvailable_bytes / (node_memory_MemTotal_bytes)))* 100",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "内存使用率",
          "refId": "E"
        },
        {
          "expr": "node_load5",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "负载",
          "refId": "F"
        },
        {
          "expr": "up{ job=\"node-exporter\"}",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "是否宕机",
          "refId": "G"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "宿主机",
      "transformations": [
        {
          "id": "seriesToColumns",
          "options": {
            "byField": "instance"
          }
        },
        {
          "id": "filterFieldsByName",
          "options": {
            "include": {
              "names": [
                "instance",
                "Value #A",
                "Value #B",
                "Value #D",
                "Value #E",
                "Value #F",
                "Value #G"
              ]
            }
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time 1": true,
              "Time 2": true
            },
            "indexByName": {
              "Value #A": 1,
              "Value #B": 2,
              "Value #D": 4,
              "Value #E": 5,
              "Value #F": 3,
              "instance": 0
            },
            "renameByName": {
              "Value #A": "CPU 核数",
              "Value #B": "内存总量",
              "Value #C": "磁盘总量",
              "Value #D": "CPU使用率",
              "Value #E": "内存使用率",
              "Value #F": "负载",
              "Value #G": "是否宕机",
              "instance": "HOST"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "collapsed": false,
      "datasource": "${DS_PROMETHEUS}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 8
      },
      "id": 8,
      "panels": [],
      "title": "集群监控",
      "type": "row"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 50
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Value #A"
            },
            "properties": [
              {
                "id": "unit",
                "value": "bits"
              },
              {
                "id": "unit",
                "value": "percent"
              },
              {
                "id": "displayName",
                "value": "内存（已分配）"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Value #B"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "CPU（已分配）"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Value #C"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "CPU（已使用）"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Value #D"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "内存（已使用）"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 6,
        "w": 24,
        "x": 0,
        "y": 9
      },
      "id": 4,
      "options": {
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "pluginVersion": "7.3.1",
      "targets": [
        {
          "expr": "sum(namespace:kube_pod_container_resource_requests_cpu_cores:sum)/sum(kube_node_status_capacity_cpu_cores) * 100",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "CPU使用率",
          "refId": "B"
        },
        {
          "expr": "sum(namespace:container_cpu_usage_seconds_total:sum_rate)/sum(kube_node_status_capacity_cpu_cores) * 100",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "C"
        },
        {
          "expr": "sum(namespace:kube_pod_container_resource_requests_memory_bytes:sum)/sum(kube_node_status_capacity_memory_bytes) * 100",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        },
        {
          "expr": "sum(namespace:container_memory_usage_bytes:sum)/sum(kube_node_status_capacity_memory_bytes) * 100",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "D"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "资源分配占比",
      "transformations": [],
      "type": "gauge"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "none"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Value #A"
            },
            "properties": [
              {
                "id": "unit",
                "value": "bits"
              },
              {
                "id": "displayName",
                "value": "内存"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Value #B"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "CPU"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 3,
        "w": 8,
        "x": 0,
        "y": 15
      },
      "id": 10,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "7.3.1",
      "targets": [
        {
          "expr": "sum(kube_node_status_capacity_cpu_cores)",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "CPU",
          "refId": "B"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "总数（CPU）",
      "transformations": [],
      "type": "stat"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "none"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Value #A"
            },
            "properties": [
              {
                "id": "unit",
                "value": "bits"
              },
              {
                "id": "displayName",
                "value": "内存"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Value #B"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "CPU"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 3,
        "w": 8,
        "x": 8,
        "y": 15
      },
      "id": 9,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "7.3.1",
      "targets": [
        {
          "expr": "sum(namespace:kube_pod_container_resource_requests_cpu_cores:sum)",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "CPU使用率",
          "refId": "B"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "已分配（CPU）",
      "transformations": [],
      "type": "stat"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "none"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Value"
            },
            "properties": [
              {
                "id": "unit",
                "value": "none"
              },
              {
                "id": "displayName",
                "value": "内存"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 3,
        "w": 8,
        "x": 16,
        "y": 15
      },
      "id": 17,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "7.3.1",
      "targets": [
        {
          "expr": "sum(namespace:container_cpu_usage_seconds_total:sum_rate)",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "CPU",
          "refId": "B"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "已使用（CPU）",
      "transformations": [],
      "type": "stat"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "none"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Value"
            },
            "properties": [
              {
                "id": "unit",
                "value": "bits"
              },
              {
                "id": "displayName",
                "value": "内存"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 3,
        "w": 8,
        "x": 0,
        "y": 18
      },
      "id": 14,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "7.3.1",
      "targets": [
        {
          "expr": "sum(kube_node_status_capacity_memory_bytes)",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "CPU",
          "refId": "B"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "总数（内存）",
      "transformations": [],
      "type": "stat"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "none"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Value"
            },
            "properties": [
              {
                "id": "unit",
                "value": "bits"
              },
              {
                "id": "displayName",
                "value": "内存"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 3,
        "w": 8,
        "x": 8,
        "y": 18
      },
      "id": 13,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "7.3.1",
      "targets": [
        {
          "expr": "sum(kube_pod_container_resource_requests_memory_bytes)",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "CPU",
          "refId": "B"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "已分配（内存）",
      "transformations": [],
      "type": "stat"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "none"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Value"
            },
            "properties": [
              {
                "id": "unit",
                "value": "bits"
              },
              {
                "id": "displayName",
                "value": "内存"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 3,
        "w": 8,
        "x": 16,
        "y": 18
      },
      "id": 18,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "7.3.1",
      "targets": [
        {
          "expr": "sum(namespace:container_memory_usage_bytes:sum)",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "CPU",
          "refId": "B"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "已使用（内存）",
      "transformations": [],
      "type": "stat"
    },
    {
      "aliasColors": {
        "Value": "rgb(42, 250, 125)"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "fill": 0,
      "fillGradient": 0,
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 0,
        "y": 21
      },
      "hiddenSeries": false,
      "id": 20,
      "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.1",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum(namespace:container_cpu_usage_seconds_total:sum_rate)",
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "CPU",
      "tooltip": {
        "shared": false,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "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
      }
    },
    {
      "aliasColors": {
        "Value": "rgb(34, 0, 245)"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "unit": "bits"
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 12,
        "y": 21
      },
      "hiddenSeries": false,
      "id": 22,
      "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.1",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "$$hashKey": "object:83",
          "alias": "Value",
          "yaxis": 1
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum(namespace:container_memory_usage_bytes:sum)",
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "内存",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "bits",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "bits",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "collapsed": false,
      "datasource": "${DS_PROMETHEUS}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 30
      },
      "id": 16,
      "panels": [],
      "title": "空间详情",
      "type": "row"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": null,
            "displayMode": "color-text",
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "semi-dark-blue",
                "value": null
              },
              {
                "color": "yellow",
                "value": 1
              },
              {
                "color": "red",
                "value": 2
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 13,
        "w": 12,
        "x": 0,
        "y": 31
      },
      "id": 29,
      "options": {
        "showHeader": true
      },
      "pluginVersion": "7.3.1",
      "targets": [
        {
          "expr": "topk(10, sum(irate(container_cpu_usage_seconds_total{namespace !~ \"kubesphere.*|kube.*|openpitrix.*|istio.*\", container!~ \"istio.*|logsidecar.*|POD|\"}[2m])) by (container, pod, node))",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "CPU使用",
      "transformations": [
        {
          "id": "filterFieldsByName",
          "options": {
            "include": {
              "names": [
                "namespace",
                "node",
                "pod",
                "Value",
                "container"
              ]
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "super-light-blue",
            "mode": "fixed"
          },
          "custom": {
            "align": null,
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "super-light-orange",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 13,
        "w": 12,
        "x": 12,
        "y": 31
      },
      "id": 12,
      "options": {
        "displayMode": "basic",
        "orientation": "vertical",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "fields": "",
          "values": false
        },
        "showUnfilled": true
      },
      "pluginVersion": "7.3.1",
      "repeat": null,
      "targets": [
        {
          "expr": "topk(5, namespace:container_cpu_usage_seconds_total:sum_rate)",
          "format": "time_series",
          "instant": true,
          "interval": "",
          "legendFormat": "{{ namespace }}",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "CPU 使用",
      "transformations": [],
      "type": "bargauge"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": null,
            "displayMode": "color-text",
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 1024000000
              }
            ]
          },
          "unit": "bits"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 12,
        "w": 12,
        "x": 0,
        "y": 44
      },
      "id": 28,
      "options": {
        "showHeader": true
      },
      "pluginVersion": "7.3.1",
      "targets": [
        {
          "expr": "topk(10, sum(container_memory_usage_bytes{namespace !~ \"kubesphere.*|kube.*|openpitrix.*|istio.*\", container!~ \"istio.*|logsidecar.*|POD|\"}) by (container, pod, node))",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "内存使用",
      "transformations": [
        {
          "id": "filterFieldsByName",
          "options": {
            "include": {
              "names": [
                "namespace",
                "node",
                "pod",
                "Value",
                "container"
              ]
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "super-light-blue",
            "mode": "fixed"
          },
          "custom": {},
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "light-blue",
                "value": null
              }
            ]
          },
          "unit": "bits"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 12,
        "w": 12,
        "x": 12,
        "y": 44
      },
      "id": 24,
      "options": {
        "displayMode": "lcd",
        "orientation": "vertical",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "fields": "",
          "values": false
        },
        "showUnfilled": false
      },
      "pluginVersion": "7.3.1",
      "repeat": null,
      "targets": [
        {
          "expr": "topk(5, namespace:container_memory_usage_bytes:sum)",
          "format": "time_series",
          "instant": true,
          "interval": "",
          "legendFormat": "{{ namespace }}",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "内存使用",
      "type": "bargauge"
    }
  ],
  "refresh": "10s",
  "schemaVersion": 26,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-6h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "kubesphere",
  "uid": "g7z_1A2Gk",
  "version": 43
}