Grafana-prometheus k8s集群容量监控大盘配置

效果图

在这里插入图片描述
在这里插入图片描述

参数设置

在这里插入图片描述

JSON

{
   
  "annotations": {
   
    "list": [
      {
   
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": null,
  "graphTooltip": 0,
  "id": 584,
  "iteration": 1664508893169,
  "links": [],
  "panels": [
    {
   
      "aliasColors": {
   },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${datasource}",
      "description": "",
      "fieldConfig": {
   
        "defaults": {
   
          "unit": "percent"
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
   
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 0
      },
      "hiddenSeries": false,
      "id": 20,
      "legend": {
   
        "avg": true,
        "current": false,
        "max": true,
        "min": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
   
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.5.10",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
   
          "exemplar": true,
          "expr": "(sum(container_memory_working_set_bytes{container!=\"POD\", name!=\"\"}) / sum(kube_node_status_allocatable_memory_bytes)) * 100 ",
          "hide": false,
          "interval": "",
          "legendFormat": "cluster",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "集群内存使用率",
      "tooltip": {
   
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
   
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
   
          "$$hashKey": "object:319",
          "format": "percent",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
   
          "$$hashKey": "object:320",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
   
        "align": false,
        "alignLevel": null
      }
    },
    {
   
      "aliasColors": {
   },
      "breakPoint": "50%",
      "cacheTimeout": null,
      "combine": {
   
        "label": "Others",
        "threshold": 0
      },
      "datasource": "$datasource",
      "fieldConfig": {
   
        "defaults": {
   },
        "overrides": []
      },
      "fontSize": "80%",
      "format": "percent",
      "gridPos": {
   
        "h": 8,
        "w": 6,
        "x": 12,
        "y": 0
      },
      "id": 15,
      "interval": null,
      "legend": {
   
        "show": true,
        "values": true
      },
      "legendType": "Under graph",
      "links": [],
      "maxDataPoints": 3,
      "nullPointMode": "connected",
      "pieType": "pie",
      "strokeWidth": 1,
      "targets": [
        {
   
          "application": {
   
            "filter": ""
          },
          "exemplar": true,
          "expr": "(sum(kube_pod_container_resource_limits_memory_bytes) / sum(kube_node_status_allocatable_memory_bytes)) * 100",
          "format": "time_series",
          "functions": [],
          "group": {
   
            "filter": ""
          },
          "hide": false,
          "host": {
   
            "filter": ""
          },
          "interval": "",
          "intervalFactor": 1,
          "item": {
   
            "filter": ""
          },
          "legendFormat": "内存Limit比例",
          "mode": 0,
          "options": {
   
            "showDisabledItems": false
          },
          "refId": "A",
          "triggers": {
   
            "acknowledged": 2,
            "count": true,
            "minSeverity": 3
          }
        },
        {
   
          "exemplar": true,
          "expr": "100 - (sum(kube_pod_container_resource_limits_memory_bytes) / sum(kube_node_status_allocatable_memory_bytes)) * 100",
          "format": "time_series",
          "hide": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "内存剩余比例",
          "refId": "B"
        }
      ],
      "title": "所有节点内存超配比例",
      "type": "grafana-piechart-panel",
      "valueName": "current"
    },
    {
   
      "aliasColors": {
   },
      "breakPoint": "50%",
      "cacheTimeout": null,
      "combine": {
   
        "label": "Others",
        "threshold": 0
      },
      "datasource": "$datasource",
      "fieldConfig": {
   
        "defaults": {
   },
        "overrides": []
      },
      &#
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

鬼刺

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值