Grafana-zabbix数据源之主机组监控聚合图

效果图

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

参数设置

https://grafana.com/grafana/dashboards/5456-zabbix-servers-status-table/
注意:variables Group自己配置的不知道为啥不好使,从模版导入的可以!
在这里插入图片描述
在这里插入图片描述

json

{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "description": "An easy way to view the performance of your servers",
  "editable": true,
  "gnetId": 5456,
  "graphTooltip": 0,
  "id": 589,
  "iteration": 1664506649540,
  "links": [],
  "panels": [
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "unit": "short"
        },
        "overrides": []
      },
      "fill": 0,
      "fillGradient": 0,
      "gridPos": {
        "h": 18,
        "w": 18,
        "x": 0,
        "y": 0
      },
      "hiddenSeries": false,
      "id": 13,
      "legend": {
        "avg": true,
        "current": false,
        "hideZero": 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": [
        {
          "application": {
            "filter": "Memory"
          },
          "functions": [
            {
              "$$hashKey": "object:2242",
              "def": {
                "category": "Alias",
                "defaultParams": [
                  "/(.*)/",
                  "$1"
                ],
                "name": "replaceAlias",
                "params": [
                  {
                    "name": "regexp",
                    "type": "string"
                  },
                  {
                    "name": "newAlias",
                    "type": "string"
                  }
                ]
              },
              "params": [
                "/: Memory used percent/",
                "$'"
              ],
              "text": "replaceAlias(/: Memory used percent/, $')"
            }
          ],
          "group": {
            "filter": "$Group"
          },
          "host": {
            "filter": "$Hosts"
          },
          "item": {
            "filter": "Memory used percent"
          },
          "options": {
            "showDisabledItems": false,
            "skipEmptyValues": false
          },
          "proxy": {
            "filter": ""
          },
          "queryType": 0,
          "refId": "A",
          "resultFormat": "time_series",
          "table": {
            "skipEmptyValues": false
          },
          "tags": {
            "filter": ""
          },
          "trigger": {
            "filter": ""
          },
          "triggers": {
            "acknowledged": 2,
            "count": true,
            "minSeverity": 3
          }
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Memory used 趋势图 %",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:1965",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:1966",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "datasource": "OurZabbix",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": null,
            "displayMode": "color-background",
            "filterable": false
          },
          "decimals": 0,
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "rgba(50, 172, 45, 0.97)",
                "value": null
              },
              {
                "color": "rgba(237, 129, 40, 0.89)",
                "value": 70
              },
              {
                "color": "rgba(245, 54, 54, 0.9)",
                "value": 90
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Field"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": null
              },
              {
                "id": "color",
                "value": {
                  "fixedColor": "rgba(1, 6, 13, 0.3)",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Last"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 60
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 18,
        "w": 6,
        "x": 18,
        "y": 0
      },
      "id": 1,
      "links": [],
      "options": {
        "showHeader": false,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Last"
          }
        ]
      },
      "pluginVersion": "7.5.10",
      "targets": [
        {
          "application": {
            "filter": "Memory"
          },
          "functions": [
            {
              "$$hashKey": "object:2168",
              "def": {
                "category": "Alias",
                "defaultParams": [
                  "/(.*)/",
                  "$1"
                ],
                "name": "replaceAlias",
                "params": [
                  {
                    "name": "regexp",
                    "type": "string"
                  },
                  {
                    "name": "newAlias",
                    "type": "string"
                  }
                ]
              },
              "params": [
                "/: Memory used percent/",
                "$'"
              ],
              "text": "replaceAlias(/: Memory used percent/, $')"
            }
          ],
          "group": {
            "filter": "$Group"
          },
          "host": {
            "filter": "$Hosts"
          },
          "item": {
            "filter": "Memory used percent"
          },
          "options": {
            "disableDataAlignment": false,
            "showDisabledItems": false,
            "skipEmptyValues": false,
            "useZabbixValueMapping": false
          },
          "proxy": {
            "filter": ""
          },
          "queryType": 0,
          "refId": "A",
          "resultFormat": "time_series",
          "table": {
            "skipEmptyValues": false
          },
          "tags": {
            "filter": ""
          },
          "trigger": {
            "filter": ""
          },
          "triggers": {
            "acknowledged": 2,
            "count": true,
            "minSeverity": 3
          }
        }
      ],
      "title": "Memory Used %",
      "transformations": [
        {
          "id": "reduce",
          "options": {
            "includeTimeField": false,
            "reducers": [
              "last"
            ]
          }
        }
      ],
      "type": "table"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "unit": "short"
        },
        "overrides": []
      },
      "fill": 0,
      "fillGradient": 0,
      "gridPos": {
        "h": 18,
        "w": 18,
        "x": 0,
        "y": 18
      },
      "hiddenSeries": false,
      "id": 14,
      "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": [
        {
          "application": {
            "filter": "Memory"
          },
          "functions": [
            {
              "$$hashKey": "object:2363",
              "def": {
                "category": "Alias",
                "defaultParams": [
                  "/(.*)/",
                  "$1"
                ],
                "name": "replaceAlias",
                "params": [
                  {
                    "name": "regexp",
                    "type": "string"
                  },
                  {
                    "name": "newAlias",
                    "type": "string"
                  }
                ]
              },
              "params": [
                "/: Available memory percent/",
                "$'"
              ],
              "text": "replaceAlias(/: Available memory percent/, $')"
            }
          ],
          "group": {
            "filter": "$Group"
          },
          "host": {
            "filter": "$Hosts"
          },
          "item": {
            "filter": "Available memory percent"
          },
          "options": {
            "showDisabledItems": false,
            "skipEmptyValues": false
          },
          "proxy": {
            "filter": ""
          },
          "queryType": 0,
          "refId": "A",
          "resultFormat": "time_series",
          "table": {
            "skipEmptyValues": false
          },
          "tags": {
            "filter": ""
          },
          "trigger": {
            "filter": ""
          },
          "triggers": {
            "acknowledged": 2,
            "count": true,
            "minSeverity": 3
          }
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Memory Available 趋势图 %",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:2079",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:2080",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "datasource": "OurZabbix",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": null,
            "displayMode": "color-background",
            "filterable": false
          },
          "decimals": 0,
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "rgba(50, 172, 45, 0.97)",
                "value": null
              },
              {
                "color": "rgba(237, 129, 40, 0.89)",
                "value": 70
              },
              {
                "color": "rgba(245, 54, 54, 0.9)",
                "value": 90
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Field"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": null
              },
              {
                "id": "color",
                "value": {
                  "fixedColor": "rgba(1, 6, 13, 0.3)",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Last"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 60
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 18,
        "w": 6,
        "x": 18,
        "y": 18
      },
      "id": 15,
      "links": [],
      "options": {
        "showHeader": false,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Last"
          }
        ]
      },
      "pluginVersion": "7.5.10",
      "targets": [
        {
          "application": {
            "filter": "Memory"
          },
          "functions": [
            {
              "$$hashKey": "object:436",
              "def": {
                "category": "Alias",
                "defaultParams": [
                  "/(.*)/",
                  "$1"
                ],
                "name": "replaceAlias",
                "params": [
                  {
                    "name": "regexp",
                    "type": "string"
                  },
                  {
                    "name": "newAlias",
                    "type": "string"
                  }
                ]
              },
              "params": [
                "/: Available memory percent/",
                "$'"
              ],
              "text": "replaceAlias(/: Available memory percent/, $')"
            }
          ],
          "group": {
            "filter": "$Group"
          },
          "host": {
            "filter": "$Hosts"
          },
          "item": {
            "filter": "Available memory percent"
          },
          "options": {
            "disableDataAlignment": false,
            "showDisabledItems": false,
            "skipEmptyValues": false,
            "useZabbixValueMapping": false
          },
          "proxy": {
            "filter": ""
          },
          "queryType": 0,
          "refId": "A",
          "resultFormat": "time_series",
          "table": {
            "skipEmptyValues": false
          },
          "tags": {
            "filter": ""
          },
          "trigger": {
            "filter": ""
          },
          "triggers": {
            "acknowledged": 2,
            "count": true,
            "minSeverity": 3
          }
        }
      ],
      "title": "Memory Available %",
      "transformations": [
        {
          "id": "reduce",
          "options": {
            "includeTimeField": false,
            "reducers": [
              "last"
            ]
          }
        }
      ],
      "type": "table"
    }
  ],
  "refresh": "5m",
  "schemaVersion": 27,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {
          "selected": false,
          "text": "国内-生产-K8S",
          "value": "国内-生产-K8S"
        },
        "datasource": "OurZabbix",
        "definition": "",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "Group",
        "options": [],
        "query": "*",
        "refresh": 1,
        "regex": "/K8S$/",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {
          "selected": false,
          "text": "All",
          "value": "$__all"
        },
        "datasource": "OurZabbix",
        "definition": "",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": false,
        "name": "Hosts",
        "options": [],
        "query": "$Group.*",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-6h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "k8s集群容量监控-内存使用率",
  "uid": "8lhgYN4Vz",
  "version": 4
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

鬼刺

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

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

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

打赏作者

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

抵扣说明:

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

余额充值