Grafana dashboard: Linux 系统节点状态大盘
Description: 包含 cpu、load、net、tcp、disk、diskio


{
  "__inputs": [
    {
      "name": "DS_VICTORIAMETRICS",
      "label": "VictoriaMetrics",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__elements": {},
  "__requires": [
    {
      "type": "panel",
      "id": "bargauge",
      "name": "Bar gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "9.4.3"
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "uid": "-- Grafana --"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "description": "包含 cpu、load、net、tcp、disk、diskio",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "gnetId": 18435,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 13,
      "panels": [],
      "title": "主机数：【$total_host】",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "cellOptions": {
              "type": "auto"
            },
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "系统运行时间"
            },
            "properties": [
              {
                "id": "unit",
                "value": "s"
              },
              {
                "id": "custom.width",
                "value": 99
              }
            ]
          },
          {
            "matcher": {
              "id": "byRegexp",
              "options": "(.*)带宽"
            },
            "properties": [
              {
                "id": "unit",
                "value": "binBps"
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-text"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "内存"
            },
            "properties": [
              {
                "id": "unit",
                "value": "decbytes"
              },
              {
                "id": "custom.width",
                "value": 79
              },
              {
                "id": "decimals",
                "value": 0
              },
              {
                "id": "custom.filterable",
                "value": true
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "CPU 使用率"
            },
            "properties": [
              {
                "id": "unit",
                "value": "percent"
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "mode": "lcd",
                  "type": "gauge"
                }
              },
              {
                "id": "custom.width",
                "value": 138
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "内存使用率"
            },
            "properties": [
              {
                "id": "unit",
                "value": "percent"
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "mode": "lcd",
                  "type": "gauge"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "CPU 核心数"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 94
              },
              {
                "id": "custom.filterable",
                "value": true
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "操作系统"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 78
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "平台架构"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 73
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "ESTAB 连接数"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 106
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-text"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "上传带宽"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 99
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "load 1"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 58
              },
              {
                "id": "decimals",
                "value": 2
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-text"
                }
              },
              {
                "id": "color",
                "value": {
                  "fixedColor": "orange",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "load 5"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 61
              },
              {
                "id": "decimals",
                "value": 2
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-text"
                }
              },
              {
                "id": "color",
                "value": {
                  "fixedColor": "orange",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "load 15"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 66
              },
              {
                "id": "decimals",
                "value": 2
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-text"
                }
              },
              {
                "id": "color",
                "value": {
                  "fixedColor": "orange",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "内核版本"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 103
              },
              {
                "id": "custom.filterable",
                "value": true
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "主机名"
            },
            "properties": [
              {
                "id": "custom.filterable",
                "value": true
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 6,
        "w": 24,
        "x": 0,
        "y": 1
      },
      "id": 7,
      "options": {
        "footer": {
          "countRows": false,
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "frameIndex": 0,
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "9.4.3",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "node_uname_info{job=~\"node.*\"} - 0",
          "format": "table",
          "hide": false,
          "instant": true,
          "legendFormat": "主机名",
          "range": false,
          "refId": "基础信息"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "sum(time() - node_boot_time_seconds) by (instance) - 0",
          "format": "table",
          "hide": false,
          "instant": true,
          "legendFormat": "系统运行时间",
          "range": false,
          "refId": "系统运行时间"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "count(node_cpu_seconds_total{mode=\"idle\"}) by (instance) - 0",
          "format": "table",
          "hide": false,
          "instant": true,
          "legendFormat": "CPU 核心数",
          "range": false,
          "refId": "CPU 核数"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "node_memory_MemTotal_bytes - 0",
          "format": "table",
          "hide": false,
          "instant": true,
          "legendFormat": "总内存",
          "range": false,
          "refId": "总内存"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "(1 -\r\nsum(increase(node_cpu_seconds_total{mode=\"idle\"}[$interval])) by (instance) \r\n/ \r\nsum(increase(node_cpu_seconds_total[$interval])) by (instance)\r\n) * 100 - 0",
          "format": "table",
          "hide": false,
          "instant": true,
          "legendFormat": "CPU 使用率",
          "range": false,
          "refId": "CPU 使用率"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "(1 - \r\n (node_memory_MemFree_bytes + node_memory_Buffers_bytes + node_memory_Cached_bytes) \r\n  / \r\n node_memory_MemTotal_bytes)\r\n* 100 - 0",
          "format": "table",
          "hide": false,
          "instant": true,
          "legendFormat": "内存使用率",
          "range": false,
          "refId": "内存使用率"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "node_load1{job=~\"node.*\"}  - 0",
          "format": "table",
          "hide": false,
          "instant": true,
          "legendFormat": "最近 5m 负载",
          "range": false,
          "refId": "最近 1m 负载"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "node_load5{job=~\"node.*\"}  - 0",
          "format": "table",
          "hide": false,
          "instant": true,
          "legendFormat": "最近 5m 负载",
          "range": false,
          "refId": "最近5分钟负载"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "node_load15{job=~\"node.*\"}  - 0",
          "format": "table",
          "hide": false,
          "instant": true,
          "legendFormat": "最近 15m 负载",
          "range": false,
          "refId": "最近 15m 负载"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "node_netstat_Tcp_CurrEstab{job=~\"node.*\"}  - 0",
          "format": "table",
          "hide": false,
          "instant": true,
          "legendFormat": "ESTAB 连接数",
          "range": false,
          "refId": "ESTAB 连接数"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "max(rate(node_network_transmit_bytes_total[$interval])) by (instance) - 0",
          "format": "table",
          "hide": false,
          "instant": true,
          "legendFormat": "上传带宽",
          "range": false,
          "refId": "上传带宽"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "max(rate(node_network_receive_bytes_total[$interval])) by (instance) - 0",
          "format": "table",
          "hide": false,
          "instant": true,
          "legendFormat": "下载带宽",
          "range": false,
          "refId": "下载带宽"
        }
      ],
      "title": "节点信息",
      "transformations": [
        {
          "id": "merge",
          "options": {}
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true,
              "Value": true,
              "Value #基础信息": true,
              "__name__": true,
              "domainname": true,
              "instance": true,
              "job": true,
              "machine": true,
              "sysname": true,
              "version": true
            },
            "indexByName": {
              "Time": 0,
              "Value #CPU 使用率": 13,
              "Value #CPU 核数": 11,
              "Value #ESTAB 连接数": 18,
              "Value #上传带宽": 19,
              "Value #下载带宽": 20,
              "Value #内存使用率": 14,
              "Value #基础信息": 9,
              "Value #总内存": 12,
              "Value #最近 15m 负载": 17,
              "Value #最近 1m 负载": 15,
              "Value #最近5分钟负载": 16,
              "Value #系统运行时间": 10,
              "domainname": 1,
              "instance": 2,
              "job": 3,
              "machine": 6,
              "nodename": 4,
              "release": 7,
              "sysname": 5,
              "version": 8
            },
            "renameByName": {
              "Value #CPU 使用率": "CPU 使用率",
              "Value #CPU 核数": "CPU 核心数",
              "Value #ESTAB 连接数": "ESTAB 连接数",
              "Value #上传带宽": "上传带宽",
              "Value #下载带宽": "下载带宽",
              "Value #内存使用率": "内存使用率",
              "Value #基础信息": "",
              "Value #总内存": "内存",
              "Value #最近 15m 负载": "load 15",
              "Value #最近 1m 负载": "load 1",
              "Value #最近5分钟负载": "load 5",
              "Value #系统运行时间": "系统运行时间",
              "__name__": "",
              "machine": "平台架构",
              "nodename": "主机名",
              "release": "内核版本",
              "sysname": "操作系统",
              "version": ""
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 7
      },
      "id": 75,
      "panels": [],
      "title": "Systemd：【$select_hostname】",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "* `Activating` 正在启动中的服务数\n* `Active` 已启动成功的服务\n* `Deactivating` 正在停止中的服务\n* `Failed` 启动失败的服务(`crash、timeout、$? !=0`)\n* `Inactive` 尚未启动的服务",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "links": [],
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "short"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Active"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "green",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Activating"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "light-blue",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Deactivating"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "light-orange",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Failed"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "red",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Inactive"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "#3c4855",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 4,
        "w": 24,
        "x": 0,
        "y": 8
      },
      "id": 77,
      "links": [],
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.4.3",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "node_systemd_units{instance=\"$host\",state=\"activating\"}",
          "format": "time_series",
          "hide": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "Activating",
          "range": true,
          "refId": "Activating 启动中服务数",
          "step": 240
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "node_systemd_units{instance=\"$host\",state=\"active\"}",
          "format": "time_series",
          "hide": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "Active",
          "range": true,
          "refId": "Active 已启动成功的服务",
          "step": 240
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "node_systemd_units{instance=\"$host\", state=\"deactivating\"}",
          "format": "time_series",
          "hide": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "Deactivating",
          "range": true,
          "refId": "Deactivating 正在停止中的服务",
          "step": 240
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "node_systemd_units{instance=\"$host\",state=\"failed\"}",
          "format": "time_series",
          "hide": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "Failed",
          "range": true,
          "refId": "Failed 启动失败的服务",
          "step": 240
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "node_systemd_units{instance=\"$host\",state=\"inactive\"}",
          "format": "time_series",
          "hide": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "Inactive",
          "range": true,
          "refId": "Inactive 尚未启动的服务",
          "step": 240
        }
      ],
      "title": "Systemd Units 状态",
      "type": "stat"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 12
      },
      "id": 11,
      "panels": [],
      "title": "CPU：【$select_hostname】",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "节点 CPU 使用率（核心汇总）\n\n对应 `top` 命令 `%Cpu(s)` 行数据",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 15,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "smooth",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 2,
            "pointSize": 8,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 13
      },
      "id": 2,
      "options": {
        "legend": {
          "calcs": [
            "max",
            "mean",
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true,
          "sortBy": "Max",
          "sortDesc": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "9.4.3",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "(1 - sum(irate(node_cpu_seconds_total{instance=~\"$host\", mode=\"idle\"}[$interval])) by (instance) / sum(irate(node_cpu_seconds_total{instance=~\"$host\"}[$interval])) by (instance) ) * 100",
          "hide": false,
          "instant": false,
          "interval": "",
          "legendFormat": "总使用率",
          "range": true,
          "refId": "TOTAL_CPU_USAGE"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "sum(irate(node_cpu_seconds_total{instance=~\"$host\", mode=\"system\"}[$interval])) by (instance) / sum(irate(node_cpu_seconds_total{instance=~\"$host\"}[$interval])) by (instance) * 100",
          "hide": false,
          "instant": false,
          "interval": "",
          "legendFormat": "内核空间",
          "range": true,
          "refId": "SYSTEM_USAGE"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "sum(irate(node_cpu_seconds_total{instance=~\"$host\", mode=\"user\"}[$interval])) by (instance) / sum(irate(node_cpu_seconds_total{instance=~\"$host\"}[$interval])) by (instance) * 100",
          "hide": false,
          "instant": false,
          "interval": "",
          "legendFormat": "用户空间",
          "range": true,
          "refId": "USER_USAGE"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "sum(irate(node_cpu_seconds_total{instance=~\"$host\", mode=\"iowait\"}[$interval])) by (instance) / sum(irate(node_cpu_seconds_total{instance=~\"$host\"}[$interval])) by (instance) * 100",
          "hide": false,
          "instant": false,
          "interval": "",
          "legendFormat": "IO 等待",
          "range": true,
          "refId": "IOWAIT_USAGE"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "sum(irate(node_cpu_seconds_total{instance=~\"$host\", mode=\"irq\"}[$interval])) by (instance) / sum(irate(node_cpu_seconds_total{instance=~\"$host\"}[$interval])) by (instance) * 100",
          "hide": false,
          "instant": false,
          "interval": "",
          "legendFormat": "硬中断",
          "range": true,
          "refId": "IRQ_USAGE"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "sum(irate(node_cpu_seconds_total{instance=~\"$host\", mode=\"softirq\"}[$interval])) by (instance) / sum(irate(node_cpu_seconds_total{instance=~\"$host\"}[$interval])) by (instance) * 100",
          "hide": false,
          "instant": false,
          "interval": "",
          "legendFormat": "软中断",
          "range": true,
          "refId": "SOFT_IRQ_USAGE"
        }
      ],
      "title": "CPU 使用率",
      "transformations": [
        {
          "id": "renameByRegex",
          "options": {
            "regex": "(.*):(\\d+)(.*)",
            "renamePattern": "$1$3"
          }
        }
      ],
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "节点 CPU 使用率（单核汇总）\n\n对应 `top` 命令摁下 `1` 之后多核心统计数据",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 2,
          "mappings": [],
          "max": 100,
          "min": 0.1,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "yellow",
                "value": 50
              },
              {
                "color": "orange",
                "value": 70
              },
              {
                "color": "red",
                "value": 90
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 12,
        "x": 12,
        "y": 13
      },
      "id": 3,
      "options": {
        "displayMode": "lcd",
        "minVizHeight": 10,
        "minVizWidth": 0,
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "max"
          ],
          "fields": "",
          "values": false
        },
        "showUnfilled": true,
        "text": {
          "valueSize": 20
        }
      },
      "pluginVersion": "9.4.3",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "(1 - sum(irate(node_cpu_seconds_total{instance=~\"$host\", mode=\"idle\"}[$interval])) by (instance, cpu)  / sum(irate(node_cpu_seconds_total{instance=~\"$host\"}[$interval])) by (instance, cpu)) * 100 ",
          "format": "time_series",
          "hide": false,
          "instant": false,
          "interval": "",
          "legendFormat": "{{instance}}-{{cpu}}",
          "range": true,
          "refId": "CPU 各核心使用率"
        }
      ],
      "title": "CPU 使用率",
      "transformations": [
        {
          "id": "renameByRegex",
          "options": {
            "regex": "(.*):9110-(.*)",
            "renamePattern": "CPU-$2"
          }
        }
      ],
      "type": "bargauge"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "上下文切换次数\n\n对应 `vmstat 1` 命令 `cs` 列的数值",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-BlPu"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 15,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "smooth",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 2,
            "pointSize": 8,
            "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": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 12,
        "x": 12,
        "y": 16
      },
      "id": 23,
      "options": {
        "legend": {
          "calcs": [
            "max",
            "min",
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": false
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "irate(node_context_switches_total{instance=~\"$host\"}[$interval])",
          "hide": false,
          "legendFormat": "context switch/s",
          "range": true,
          "refId": "上下文切换"
        }
      ],
      "title": "上下文切换次数",
      "transformations": [
        {
          "id": "renameByRegex",
          "options": {
            "regex": "(.*):9110",
            "renamePattern": "$1"
          }
        }
      ],
      "type": "timeseries"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 21
      },
      "id": 25,
      "panels": [],
      "title": "内存：【$select_hostname】",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "-   `node_memory_MemTotal_bytes`：节点内存总容量\n-   `node_memory_MemFree_bytes`：节点可用内存\n-   `node_memory_MemAvailable_bytes`：节点可用内存（包括部分 `buffers/cached`）\n-   `node_memory_Buffers_bytes`：节点 `buffers` 缓冲 \n-   `node_memory_Cached_bytes`：节点 `cached` 缓存\n\n从应用程序的角度来说，`available` = `free` + `buffer` + `cache`\n\n但是！这只是一个理想的计算方式，实际中的数据有较大的误差，因为 `buffer/cache` 中并非所有空间都可以回收，毕竟可能存在其他进程正在使用",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 15,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 2,
            "pointSize": 8,
            "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": "bytes"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byRegexp",
              "options": "(.*)用百分比"
            },
            "properties": [
              {
                "id": "custom.drawStyle",
                "value": "points"
              },
              {
                "id": "custom.showPoints",
                "value": "always"
              },
              {
                "id": "custom.lineWidth",
                "value": 0
              },
              {
                "id": "custom.pointSize",
                "value": 6
              },
              {
                "id": "unit",
                "value": "percentunit"
              },
              {
                "id": "max",
                "value": 1
              },
              {
                "id": "custom.axisLabel",
                "value": "内存使用率"
              },
              {
                "id": "custom.axisPlacement",
                "value": "right"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "总内存"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "blue",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "可用内存"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "green",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "已用内存"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "orange",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 7,
        "w": 8,
        "x": 0,
        "y": 22
      },
      "id": 5,
      "options": {
        "legend": {
          "calcs": [
            "max",
            "mean",
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "node_memory_MemTotal_bytes{instance=~\"$host\"}",
          "hide": false,
          "legendFormat": "总内存",
          "range": true,
          "refId": "TOTAL_MEMORY"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "node_memory_MemTotal_bytes{instance=~\"$host\"} - node_memory_MemAvailable_bytes{instance=~\"$host\"}",
          "hide": false,
          "legendFormat": "已用内存",
          "range": true,
          "refId": "MEMORY_USAGE"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "node_memory_MemAvailable_bytes{instance=~\"$host\"}",
          "hide": false,
          "legendFormat": "可用内存",
          "range": true,
          "refId": "MEMORY_AVAILABLE"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "(1 - \r\n (node_memory_MemFree_bytes{instance=~\"$host\"} + node_memory_Buffers_bytes{instance=~\"$host\"} + node_memory_Cached_bytes{instance=~\"$host\"}) \r\n  / \r\n node_memory_MemTotal_bytes{instance=~\"$host\"})",
          "format": "heatmap",
          "hide": false,
          "instant": false,
          "interval": "5m",
          "legendFormat": "已用百分比",
          "range": true,
          "refId": "MEMORY_USAGE_PERCENT"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "node_memory_MemAvailable_bytes{instance=~\"$host\"} /  node_memory_MemTotal_bytes{instance=~\"$host\"}",
          "format": "time_series",
          "hide": false,
          "interval": "5m",
          "legendFormat": "可用百分比",
          "range": true,
          "refId": "AVAILABLE_MEMORY_PERCENT"
        }
      ],
      "title": "内存使用率",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "`Active/inactive memory` 针对用户进程所占用的内存，不包括内核占用的内存（如 `Slab`）\n\n系统 `Inactive` 内存较大，表明在必要时可以回收的内存空间很多\n\nActive 内存很大，Inactive 内存很小，则说明可以回收的内存空间不多\n\n* `node_memory_Active_bytes`：活跃内存（Active  LRU list）\n  * `/proc/meminfo` 计算公式 `Active` = `Active(anon)（anonymous pages）` + `Active(file)（file-backed pages）`\n* `node_memory_Inactive_bytes`：非活跃内存（`Inactive  LRU list`）\n  * `/proc/meminfo` 计算公式 `Inactive` = `Inactive(anon)（anonymous pages）` + `Inactive(file)（file-backed pages）`",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "left",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 15,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "smooth",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 2,
            "pointSize": 8,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "links": [],
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "bytes"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Active 活跃内存"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "light-orange",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Inactive 非活跃内存"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "super-light-blue",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 7,
        "w": 8,
        "x": 8,
        "y": 22
      },
      "id": 38,
      "links": [],
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true,
          "width": 350
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "pluginVersion": "9.2.0",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "node_memory_Active_bytes{instance=~\"$host\"}",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "Active 活跃内存",
          "range": true,
          "refId": "Active 活跃内存",
          "step": 240
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "node_memory_Inactive_bytes{instance=~\"$host\"}",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "Inactive 非活跃内存",
          "range": true,
          "refId": "Inactive 非活跃内存",
          "step": 240
        }
      ],
      "title": "活跃/非活跃内存",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "关注 `Shmem` 指标，若持续走高，检查节点 `tmpfs` 挂载点容量\n\n* `Cached` 共享内存：包括 共享文件映射（如 `File Page Cache`）、`Shmem` 匿名共享，所有共享的内存都会体现在该指标\n* `Sheme` 匿名共享：如 `tmpfs` 和 `shm`\n* `AnonPages` 私有内存：包括 私有文件映射、私有匿名内存\n\n\n",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-RdYlGr"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 15,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "pointSize": 8,
            "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": "bytes"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 8,
        "x": 16,
        "y": 22
      },
      "id": 32,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "right",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "pluginVersion": "9.4.3",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "avg_over_time(node_memory_Cached_bytes{instance=~\"$host\"}[$interval])",
          "hide": false,
          "legendFormat": "Cached 共享内存",
          "range": true,
          "refId": "Cached 共享内存"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "avg_over_time(node_memory_Shmem_bytes{instance=~\"$host\"}[$interval])",
          "legendFormat": "Shmem 匿名共享",
          "range": true,
          "refId": "Shmem 匿名共享"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "avg_over_time(node_memory_AnonPages_bytes{instance=~\"$host\"}[$interval])",
          "hide": false,
          "legendFormat": "AnonPages  私有内存",
          "range": true,
          "refId": "AnonPages  私有内存"
        }
      ],
      "title": "内存使用类型",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "\n对应 `/proc/meminfo` 中以下指标\n\n* `SReclaimable` 内存紧张时可回收的内存\n* `SUnreclaim` 不可以被回收只能等待主动释放的内存\n\n重点关注 `SUnreclaim` 指标，若该指标持续飙升，便可能发生内存泄露，严重时会引发 `oom-killer` 影响系统稳定性\n\n通过 `slabtop` 排查占比较高的项\n排查驱动程序（大概率） 以 `kmalloc` 方式申请的内存\n",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-RdYlGr"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 15,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "pointSize": 8,
            "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": "bytes"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "SUnreclaim"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "red",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 7,
        "w": 8,
        "x": 0,
        "y": 29
      },
      "id": 31,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "right",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "pluginVersion": "9.4.3",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "avg_over_time(node_memory_SReclaimable_bytes{instance=~\"$host\"}[$interval])",
          "hide": false,
          "legendFormat": "SReclaimable",
          "range": true,
          "refId": "SReclaimable"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "avg_over_time(node_memory_SUnreclaim_bytes{instance=~\"$host\"}[$interval])",
          "legendFormat": "SUnreclaim",
          "range": true,
          "refId": "SUnreclaim"
        }
      ],
      "title": "Slab 内存使用",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "默认，tmpfs 空间是内存的一半，并且 tmpfs 内存使用不会计入进程 RES 指标，所以当节点出现内存紧张，且查不到对应进程时，建议排查下 tmpfs 挂载点，是否有进程（应用）往里面持续的打数据（如日志）\n\n`df -t tmpfs -h`",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 1,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "pointSize": 8,
            "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": "bytes"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 8,
        "x": 8,
        "y": 29
      },
      "id": 36,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "(node_filesystem_size_bytes{instance=~\"$host\", fstype=\"tmpfs\"} - node_filesystem_free_bytes{instance=~\"$host\", fstype=\"tmpfs\"})",
          "legendFormat": "{{mountpoint}}",
          "range": true,
          "refId": "tmpfs 挂载点使用情况"
        }
      ],
      "title": "tmpfs 内存使用",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "oom_kill in kernel 4.13+，低版本内核没有该指标\n\n对应 `/proc/vmstat` 中 `oom_kill` 指标",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-RdYlGr"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 15,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "pointSize": 8,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "links": [],
          "mappings": [],
          "min": 0,
          "noValue": "指标不存在（oom_kill in kernel 4.13+）",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 8,
        "x": 16,
        "y": 29
      },
      "id": 40,
      "links": [],
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": false
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "pluginVersion": "9.4.3",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "node_vmstat_oom_kill{instance=~\"$host\"}",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "{{instance}}",
          "range": true,
          "refId": "OOM 发生次数",
          "step": 240
        }
      ],
      "title": "发生 OOM 次数",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "这三个是内存泄露案例中经常露脸的指标，所以单拎出来，以便于查看（还有 tmpfs）\n\n从内存泄露案例上看，大致有两种常见的场景\n1. 进程申请内存，但长时间不释放，导致随着进程运行时间越长，申请的内存就越多，可用内存越来越少\n2. 进程申请内存，不停的申请，申请的内存量和内存的释放量不成正比，导致可用内存不停的减少\n\n无论是哪种都会挤兑其他进程正常申请使用内存，甚至是引发 oom killer 杀死其他可能提供服务的应用进程",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "bytes"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "VmallocUsed"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "light-purple",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Slab SUnreclaim"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "red",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "LRU_Unevictable"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "orange",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 3,
        "w": 8,
        "x": 16,
        "y": 33
      },
      "id": 34,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.4.3",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "avg_over_time(node_memory_VmallocUsed_bytes{instance=~\"$host\"}[$interval])",
          "legendFormat": "VmallocUsed",
          "range": true,
          "refId": "通过 Vmalloc 分配的物理内存"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "avg_over_time(node_memory_Unevictable_bytes{instance=~\"$host\"}[$interval])",
          "hide": false,
          "legendFormat": "LRU_Unevictable",
          "range": true,
          "refId": "Unevictable 加锁不可回收内存"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "avg_over_time(node_memory_SUnreclaim_bytes{instance=~\"$host\"}[$interval])",
          "hide": false,
          "legendFormat": "Slab SUnreclaim",
          "range": true,
          "refId": "Slab 内存 SUnreclaim 不可回收部分"
        }
      ],
      "title": "内存泄露问题指标",
      "type": "stat"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 36
      },
      "id": 29,
      "panels": [],
      "title": "网络：【$select_hostname】",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "对应 `dstat` 命令 net/total 列的  recv  send\n\n对应 `sar -n DEV 1` 中的 rxkB/s txkB/s",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 20,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 2,
            "pointSize": 8,
            "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": "binBps"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byRegexp",
              "options": "/.*入向流量.*/"
            },
            "properties": [
              {
                "id": "custom.transform",
                "value": "negative-Y"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 7,
        "w": 8,
        "x": 0,
        "y": 37
      },
      "id": 43,
      "options": {
        "legend": {
          "calcs": [
            "max",
            "min",
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "sum by(instance, device) (irate(node_network_receive_bytes_total{instance=~\"$host\", device=~\"eth.*\"}[$interval]))",
          "hide": false,
          "legendFormat": "{{device}} 入向流量（下载）",
          "range": true,
          "refId": "入向流量（下载）不含容器"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "sum by(instance, device) (irate(node_network_transmit_bytes_total{instance=~\"$host\", device=~\"eth.*\"}[$interval]))",
          "hide": false,
          "legendFormat": "{{device}} 出向流量（上传）",
          "range": true,
          "refId": "出向流量（上传）不含容器"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "sum by(instance, device) (irate(node_network_receive_bytes_total{instance=~\"$host\", device=~\".*eth.*|docker.*\"}[$interval]))",
          "hide": true,
          "legendFormat": "{{device}} 入向流量（下载）",
          "range": true,
          "refId": "入向流量（下载）包含容器"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "sum by(instance, device) (irate(node_network_transmit_bytes_total{instance=~\"$host\", device=~\".*eth.*|docker.*\"}[$interval]))",
          "hide": true,
          "legendFormat": "{{device}} 出向流量（上传）",
          "range": true,
          "refId": "出向流量（上传）包含容器"
        }
      ],
      "title": "网卡出/入向 bandwidth",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "Packet Per Second（包 / 秒）\n\n对应 `sar -n DEV 1` 中的 `rxpck/s` 与 `txpck/s`",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 20,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 2,
            "pointSize": 8,
            "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": "pps"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byRegexp",
              "options": "/.*入向.*/"
            },
            "properties": [
              {
                "id": "custom.transform",
                "value": "negative-Y"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 7,
        "w": 8,
        "x": 8,
        "y": 37
      },
      "id": 44,
      "options": {
        "legend": {
          "calcs": [
            "max",
            "min",
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "irate(node_network_receive_packets_total{device=~\".*eth.*|docker.*\", instance=\"$host\"}[$interval])",
          "hide": true,
          "legendFormat": "{{device}} 入向 PPS",
          "range": true,
          "refId": "入向 PPS（含容器）"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "irate(node_network_receive_packets_total{device=~\".*eth.*|docker.*\", instance=\"$host\"}[$interval])",
          "hide": true,
          "legendFormat": "{{device}} 出向 PPS",
          "range": true,
          "refId": "出向 PPS（含容器）"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "irate(node_network_receive_packets_total{device=~\"eth.*\", instance=\"$host\"}[$interval])",
          "hide": false,
          "legendFormat": "{{device}} 入向 PPS",
          "range": true,
          "refId": "入向 PPS（不含容器）"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "irate(node_network_receive_packets_total{device=~\"eth.*\", instance=\"$host\"}[$interval])",
          "hide": false,
          "legendFormat": "{{device}} 出向 PPS",
          "range": true,
          "refId": "出向 PPS（不含容器）"
        }
      ],
      "title": "网卡出/入向 PPS",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "对应 `ifconfig` 输出中 `RUNNING`，`ip` 输出中有 `LOWER_UP`",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": true,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 1,
            "pointSize": 8,
            "scaleDistribution": {
              "log": 2,
              "type": "symlog"
            },
            "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": [
          {
            "matcher": {
              "id": "byRegexp",
              "options": "/.*/"
            },
            "properties": [
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "0": {
                        "color": "red",
                        "index": 0,
                        "text": "DOWN"
                      },
                      "1": {
                        "color": "light-green",
                        "index": 1,
                        "text": " UP"
                      }
                    },
                    "type": "value"
                  }
                ]
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 7,
        "w": 8,
        "x": 16,
        "y": 37
      },
      "id": 46,
      "options": {
        "legend": {
          "calcs": [
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "right",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "node_network_up{instance=\"$host\",device!~\"lo|nerd.*|br.*\"}",
          "legendFormat": "{{device}}",
          "range": true,
          "refId": "网络连接状态（包括容器）"
        }
      ],
      "title": "网卡连接状态",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "tcp retrans rate 对应 `tsar --tcp -i 1` 命令中的 retran 列\n特别说明下，默认 `tsar` 是 `1` 分钟统计 `1` 次，`prometheus` 是按照间隔采集统计的，所以两者统计数据略有差异，不过差别不大，二者对比时，也基本能和 Prometheus 某次采集统计对的上\n\ntcp out rst 是根据指标计算的，tsar 中的 EstRes（EstabResets） 列仅包含连接建立成功前（三次握手中）的 RST\n\nTCP 报文重传率、报文重置率，关于这两个指标，个人目前理解是这样的\n\n-   **报文重传率**：阈值不固定，取决于应用场景，如果节点对外提供服务（公网），而客户端主要来自移动网络，那么重传率高是可想而知的。如果是内网节点，例如 dbserver、cache server，那重传率高就说明机房内网络存在一定的问题（机房网络设备、网线等）\n-   **报文重置率**：同样区分内外网，以及应用场景，某些情况下会倾向于使用 RST 替换 FIN，以此加速连接释放、并缓解系统大量 TIME_WAIT 连接占用资源\n",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-YlRd",
            "seriesBy": "last"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 15,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "smooth",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 2,
            "pointSize": 8,
            "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": 20
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "tcp out rst rate 出向报文重置率"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "red",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "tcp retrans rate 出向报文重传率"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "orange",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 7,
        "w": 8,
        "x": 0,
        "y": 44
      },
      "id": 21,
      "options": {
        "legend": {
          "calcs": [
            "max",
            "min",
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "irate(node_netstat_Tcp_RetransSegs{instance=~\"$host\"}[$interval]) / irate(node_netstat_Tcp_OutSegs[$interval]) * 100",
          "hide": false,
          "legendFormat": "tcp retrans rate 出向报文重传率",
          "range": true,
          "refId": "TCP 报文重传率"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "irate(node_netstat_Tcp_OutRsts{instance=~\"$host\"}[$interval]) / irate(node_netstat_Tcp_OutSegs[$interval]) * 100",
          "legendFormat": "tcp out rst rate 出向报文重置率",
          "range": true,
          "refId": "TCP 报文重置率"
        }
      ],
      "title": "TCP 报文重传率",
      "transformations": [
        {
          "id": "renameByRegex",
          "options": {
            "regex": "(.*):9110",
            "renamePattern": "$1"
          }
        }
      ],
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "对应 `sar -n EDEV 1` 命令中 `rxerr/s` 与 `txerr/s`",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 15,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "pointSize": 8,
            "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": 20
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "tcp transmit errs rate  出向报文错误率"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "orange",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "tcp receive errs rate 入向报文错误率"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "purple",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 7,
        "w": 8,
        "x": 8,
        "y": 44
      },
      "id": 41,
      "options": {
        "legend": {
          "calcs": [
            "max",
            "min",
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "sum by(instance, device) (rate(node_network_transmit_errs_total{instance=~\"$host\", device=~\"eth.*\"}[$interval]) / rate(node_network_transmit_packets_total{instance=~\"$host\", device=~\"eth.*\"}[$interval]))",
          "legendFormat": "tcp transmit errs rate  出向报文错误率",
          "range": true,
          "refId": "TCP 出向报文错误率"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "sum by(instance, device) (rate(node_network_receive_errs_total{instance=~\"$host\", device=~\"eth.*\"}[$interval]) / rate(node_network_receive_packets_total{instance=~\"$host\", device=~\"eth.*\"}[$interval]))",
          "hide": false,
          "legendFormat": "tcp receive errs rate 入向报文错误率",
          "range": true,
          "refId": "TCP 入向报文错误率"
        }
      ],
      "title": "TCP 报文错误率",
      "transformations": [
        {
          "id": "renameByRegex",
          "options": {
            "regex": "(.*):9110",
            "renamePattern": "$1"
          }
        }
      ],
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "* `ListenDrops`：TCP socket 监听 syn_backlog 半连接队列溢出数（半连接队列 syn queue 溢出）\n* `ListenOverflows`：TCP socket 监听 accept 队列溢出数（全连接队列 accept queue 溢出）\n\n* 半连接溢出：`server` 收到 `syn` 已回复 `syn/ack` 等待，等待客户端 `ack`，常见于系统（应用）未配置 `backlog`，默认值多为 `1024`、`511`，稍微流量大点就出现半连接溢出，队列长度受以下两个参数影响\n  * `net.core.somaxconn = 16384`\n  * `net.ipv4.tcp_max_syn_backlog = 16384`\n* 全连接溢出：三次握手完成，但应用程序迟迟没有进行 `accept` 从队列取走连接，导致全连接队列被打满，从而溢出，队列长度受以下两个参数影响\n  * `net.core.somaxconn`\n  * 监听队列的长度，可以通过 `ss -ltnp|awk '{print $3,$NF}'` 获取\n  ",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 8,
            "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": [
          {
            "matcher": {
              "id": "byName",
              "options": "ListenDrops（syn_backlog 半连接队列溢出数）"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "semi-dark-orange",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "ListenOverflows（accept 全连接队列溢出数）"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "semi-dark-red",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 7,
        "w": 8,
        "x": 16,
        "y": 44
      },
      "id": 48,
      "options": {
        "legend": {
          "calcs": [
            "max",
            "min",
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "irate(node_netstat_TcpExt_ListenDrops{instance=~\"$host\"}[$interval])",
          "legendFormat": "ListenDrops（syn_backlog 半连接队列溢出数）",
          "range": true,
          "refId": "ListenDrops"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "irate(node_netstat_TcpExt_ListenOverflows{instance=~\"$host\"}[$interval])",
          "hide": false,
          "legendFormat": "ListenOverflows（accept 全连接队列溢出数）",
          "range": true,
          "refId": "ListenOverflows"
        }
      ],
      "title": "TCP 半/全连接队列溢出",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "以下 TCP 状态按照转移顺序进行说明：\n-   `CLOSED`：连接处于关闭状态\n-   `LISTEN`：端口处于监听状态\n-   `SYN_SENT`：客户端发送第一个SYN同步序列号后，自动进入SYN_SENT状态\n-   `SYN_RECV`：服务端收到来自客户端的SYN后，进入SYN_RECV状态\n-   `ESTABLISHED`：C/S 两端三次握手完成，已同步双方序列号，连接成功建立后进入ESTABLISHED状态\n-   `FIN_WAIT_1`：主动关闭方发送FIN报文后，表示不再发送数据，此后进入FIN_WAIT_1状态，等待被动方的ACK确认报文\n-   `CLOSE_WAIT`：CLOSE_WAIT 顾名思义，等待进程调用 close 函数关闭连接。被动关闭方接收到FIN报文，自动回复ACK确认报文，表示确认知晓你方发送通道关闭。此时如果有未发送完成的数据会继续发送给主动关闭方，如果没有数据需要发送了，则可能将ACK确认报文以及FIN报文一同发送给主动关闭方。\n-   `CLOSING`：仅出现在某些特殊情况，例如双方同时发送FIN报文，随后在等待 ACK 报文的过程中，都等来了 对方的FIN 报文，在此情况，连接会进入到 CLOSING 状态，它替代了 FIN_WAIT2 状态，此时内核会自动回复 ACK 确认对方发送通道的关闭，同时等待对方确认己方FIN返回ACK报文，如果产生丢包或超时，也会适时重发 FIN 报文的情况下最终关闭。\n-   `LAST_ACK`：被动关闭方发送FIN后，等待主动方返回 ACK 来确认连接关闭。\n-   `FIN_WAIT_2`：主动关闭方收到被动方的 ACK 后进入 FIN_WAIT2 状态\n-   `TIMEWAIT`：主动关闭方收到被动方发来的 FIN 报文时，主动方回复 ACK，表示确认对方的发送通道已经关闭，连接随之进入 TIME_WAIT 状态，等待 60 秒后关闭连接，进入最终 CLOSED 状态\n",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 15,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 2,
            "pointSize": 8,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "noValue": "0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 0,
        "y": 51
      },
      "id": 50,
      "options": {
        "legend": {
          "calcs": [
            "max",
            "min",
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "right",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "node_netstat_Tcp_CurrEstab{instance=~\"$host\"}",
          "legendFormat": "established",
          "range": true,
          "refId": "ESTABLISHED"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "node_sockstat_TCP_tw{instance=~\"$host\"}",
          "hide": false,
          "legendFormat": "time_wait",
          "range": true,
          "refId": "TIME_WAIT"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "node_tcp_connection_states{instance=~\"$host\", state!~\"estab.*|rx.*|tx.*|time.*\"}",
          "hide": false,
          "legendFormat": "{{state}} ",
          "range": true,
          "refId": "TCP state"
        }
      ],
      "title": "TCP 连接状态",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "连接追踪：Linux 为每一个经过网络堆栈的数据包，生成一条新的连接记录，并将后续的数据包都分配给对应的连接，并更新连接的状态\n\n当服务器流量过大，导致跟踪连接数超过 conntrack 参数配置的上限，那么就会导致 IP 包被丢掉，新连接无法建立\n\n对应以下两个文件\n* `/proc/sys/net/netfilter/nf_conntrack_count` 当前连接跟踪记录数\n* `/proc/sys/net/netfilter/nf_conntrack_max` 连接跟踪记录最大值",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 15,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "smooth",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 2,
            "pointSize": 8,
            "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": [
          {
            "matcher": {
              "id": "byName",
              "options": "连接追踪表使用率"
            },
            "properties": [
              {
                "id": "unit",
                "value": "percentunit"
              },
              {
                "id": "min",
                "value": 0
              },
              {
                "id": "max",
                "value": 1
              },
              {
                "id": "custom.showPoints",
                "value": "always"
              },
              {
                "id": "custom.pointSize",
                "value": 6
              },
              {
                "id": "custom.lineWidth",
                "value": 0
              },
              {
                "id": "color",
                "value": {
                  "fixedColor": "yellow",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "连接跟踪记录最大值"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "blue",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "当前连接跟踪记录数"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "orange",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 12,
        "y": 51
      },
      "id": 52,
      "options": {
        "legend": {
          "calcs": [
            "max",
            "min",
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "node_nf_conntrack_entries{instance=~\"$host\"}",
          "legendFormat": "当前连接跟踪记录数",
          "range": true,
          "refId": "当前连接跟踪记录数"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "node_nf_conntrack_entries_limit{instance=~\"$host\"}",
          "hide": false,
          "legendFormat": "连接跟踪记录最大值",
          "range": true,
          "refId": "连接跟踪记录最大值"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "(node_nf_conntrack_entries{instance=~\"$host\"} / node_nf_conntrack_entries_limit{instance=~\"$host\"})",
          "format": "heatmap",
          "hide": false,
          "instant": false,
          "interval": "2m",
          "legendFormat": "连接追踪表使用率",
          "range": true,
          "refId": "连接追踪表使用率"
        }
      ],
      "title": "nf_conntrack 连接追踪表",
      "type": "timeseries"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 58
      },
      "id": 27,
      "panels": [],
      "title": "磁盘：【$select_hostname】",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "对应 `df -h` 命令",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "left",
            "cellOptions": {
              "type": "auto"
            },
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byRegexp",
              "options": "/.*空间$/"
            },
            "properties": [
              {
                "id": "unit",
                "value": "bytes"
              },
              {
                "id": "color",
                "value": {
                  "fixedColor": "orange",
                  "mode": "fixed"
                }
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-text"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byRegexp",
              "options": "/.*使用率/"
            },
            "properties": [
              {
                "id": "unit",
                "value": "percentunit"
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "mode": "lcd",
                  "type": "gauge"
                }
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "percentage",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    },
                    {
                      "color": "light-green",
                      "value": 10
                    },
                    {
                      "color": "super-light-blue",
                      "value": 30
                    },
                    {
                      "color": "super-light-yellow",
                      "value": 50
                    },
                    {
                      "color": "orange",
                      "value": 70
                    },
                    {
                      "color": "super-light-red",
                      "value": 80
                    },
                    {
                      "color": "red",
                      "value": 95
                    }
                  ]
                }
              },
              {
                "id": "max",
                "value": 1
              },
              {
                "id": "min",
                "value": 0
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "挂载点"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 58
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-text"
                }
              },
              {
                "id": "color",
                "value": {
                  "fixedColor": "green",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "文件系统"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 75
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-text"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "磁盘分区"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 106
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "mode": "basic",
                  "type": "color-background"
                }
              },
              {
                "id": "color",
                "value": {
                  "fixedColor": "#6b83a8",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "总空间"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 76
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "已用空间"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 70
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "可用空间"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 80
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 15,
        "x": 0,
        "y": 59
      },
      "id": 79,
      "options": {
        "footer": {
          "countRows": false,
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "9.4.3",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "node_filesystem_size_bytes{instance=~\"$host\", fstype=~\"ext[3-5]+|xfs|zfs|btrfs\"} - 0",
          "format": "table",
          "instant": true,
          "legendFormat": "挂载点总空间",
          "range": false,
          "refId": "挂载点总空间"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "node_filesystem_size_bytes{instance=~\"$host\", fstype=~\"ext[3-5]+|xfs|zfs|btrfs\"}\r\n- node_filesystem_avail_bytes{instance=~\"$host\", fstype=~\"ext[3-5]+|xfs|zfs|btrfs\"} - 0",
          "format": "table",
          "hide": false,
          "instant": true,
          "legendFormat": "挂载点已用空间",
          "range": false,
          "refId": "挂载点已用空间"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "(1 - (node_filesystem_avail_bytes{instance=~\"$host\", fstype=~\"ext[3-5]+|xfs|zfs|btrfs\"}) / node_filesystem_size_bytes{instance=~\"$host\", fstype=~\"ext[3-5]+|xfs|zfs|btrfs\"})",
          "format": "table",
          "hide": false,
          "instant": true,
          "legendFormat": "空间使用率",
          "range": false,
          "refId": "空间使用率"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "node_filesystem_avail_bytes{instance=~\"$host\", fstype=~\"ext[3-5]+|xfs|zfs|btrfs\"} - 0",
          "format": "table",
          "hide": false,
          "instant": true,
          "legendFormat": "可用空间",
          "range": false,
          "refId": "可用空间"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "(1 - (node_filesystem_files_free{instance=~\"$host\", fstype=~\"ext[3-5]+|xfs|zfs|btrfs\"}) / node_filesystem_files{instance=~\"$host\", fstype=~\"ext[3-5]+|xfs|zfs|btrfs\"}) - 0",
          "format": "table",
          "hide": false,
          "instant": true,
          "legendFormat": "Inode 使用率",
          "range": false,
          "refId": "Inode 使用率"
        }
      ],
      "title": "磁盘空间情况",
      "transformations": [
        {
          "id": "merge",
          "options": {}
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true,
              "Value #挂载点已用空间": true,
              "instance": true,
              "job": true
            },
            "indexByName": {
              "Time": 1,
              "Value #可用空间": 8,
              "Value #挂载点已用空间": 7,
              "Value #挂载点总空间": 6,
              "Value #空间使用率": 9,
              "device": 0,
              "fstype": 2,
              "instance": 3,
              "job": 4,
              "mountpoint": 5
            },
            "renameByName": {
              "Time": "",
              "Value #Inode 使用率": "Inode 使用率",
              "Value #可用空间": "可用空间",
              "Value #挂载点已用空间": "已用空间",
              "Value #挂载点总空间": "总空间",
              "Value #空间使用率": "空间使用率",
              "device": "磁盘分区",
              "fstype": "文件系统",
              "instance": "",
              "mountpoint": "挂载点",
              "挂载点总空间": "已用空间"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byRegexp",
              "options": "/.*使用率.*/"
            },
            "properties": [
              {
                "id": "unit",
                "value": "percentunit"
              },
              {
                "id": "min",
                "value": 0
              },
              {
                "id": "max",
                "value": 1
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "percentage",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    },
                    {
                      "color": "yellow",
                      "value": 45
                    },
                    {
                      "color": "orange",
                      "value": 70
                    },
                    {
                      "color": "red",
                      "value": 90
                    }
                  ]
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 4,
        "w": 9,
        "x": 15,
        "y": 59
      },
      "id": 65,
      "options": {
        "displayMode": "basic",
        "minVizHeight": 10,
        "minVizWidth": 0,
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showUnfilled": true
      },
      "pluginVersion": "9.4.3",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "(1 - (node_filesystem_files_free{instance=~\"$host\", fstype=~\"ext[3-5]+|xfs|zfs|btrfs\"}) / node_filesystem_files{instance=~\"$host\", fstype=~\"ext[3-5]+|xfs|zfs|btrfs\"})",
          "hide": false,
          "interval": "5m",
          "legendFormat": "{{mountpoint}}  Inode 使用率",
          "range": true,
          "refId": "Inode 使用率"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "(1 - (node_filesystem_avail_bytes{instance=~\"$host\", fstype=~\"ext[3-5]+|xfs|zfs|btrfs\"}) / node_filesystem_size_bytes{instance=~\"$host\", fstype=~\"ext[3-5]+|xfs|zfs|btrfs\"})",
          "hide": false,
          "interval": "5m",
          "legendFormat": "{{mountpoint}}  空间 使用率",
          "range": true,
          "refId": "磁盘空间使用率"
        }
      ],
      "title": "Inode 空间使用",
      "type": "bargauge"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "对应 `/proc/sys/fs/file-nr` 第1、3列\n\n系统文件描述符上限调整参数： `fs.file-max = 65535`",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byRegexp",
              "options": "/.*使用率.*/"
            },
            "properties": [
              {
                "id": "unit",
                "value": "percentunit"
              },
              {
                "id": "min",
                "value": 0
              },
              {
                "id": "max",
                "value": 1
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "percentage",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    },
                    {
                      "color": "yellow",
                      "value": 50
                    },
                    {
                      "color": "orange",
                      "value": 80
                    },
                    {
                      "color": "red",
                      "value": 90
                    }
                  ]
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "已分配 fd"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "orange",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "系统 fd 上限"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "blue",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 4,
        "w": 9,
        "x": 15,
        "y": 63
      },
      "id": 66,
      "options": {
        "displayMode": "basic",
        "minVizHeight": 10,
        "minVizWidth": 0,
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showUnfilled": true
      },
      "pluginVersion": "9.4.3",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "node_filefd_maximum{instance=~\"$host\"}",
          "hide": false,
          "interval": "5m",
          "legendFormat": "系统 fd 上限",
          "range": true,
          "refId": "系统 fd 上限"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "node_filefd_allocated{instance=~\"$host\"}",
          "hide": false,
          "interval": "5m",
          "legendFormat": "已分配 fd",
          "range": true,
          "refId": "已分配  fd"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "node_filefd_allocated{instance=~\"$host\"} / node_filefd_maximum{instance=~\"$host\"}",
          "hide": false,
          "interval": "5m",
          "legendFormat": "系统 fd 使用率",
          "range": true,
          "refId": "系统 fd 使用率"
        }
      ],
      "title": "文件描述符使用",
      "type": "bargauge"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "不包含所有系统进程，依赖进程自己将 fd 指标是通过 metrics 暴露出来的\n\n\n进程文件描述符上限调整方式 `Systemd LimitNOFILE=65535`",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 15,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "pointSize": 8,
            "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": "none"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byRegexp",
              "options": "/.*.使用率*/"
            },
            "properties": [
              {
                "id": "unit",
                "value": "percentunit"
              },
              {
                "id": "custom.axisSoftMin",
                "value": 0
              },
              {
                "id": "max",
                "value": 1
              },
              {
                "id": "custom.lineWidth",
                "value": 0
              },
              {
                "id": "custom.pointSize",
                "value": 6
              },
              {
                "id": "custom.showPoints",
                "value": "always"
              },
              {
                "id": "color",
                "value": {
                  "fixedColor": "yellow",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "node 进程 fd 上限"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "blue",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "node 进程已打开 fd 数"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "orange",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 9,
        "x": 0,
        "y": 67
      },
      "id": 67,
      "options": {
        "legend": {
          "calcs": [
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "process_max_fds{instance=~\"$host\"}",
          "hide": false,
          "legendFormat": "{{job}} 进程 fd 上限",
          "range": true,
          "refId": "进程打开的文件描述符"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "process_open_fds{instance=~\"$host\"}",
          "hide": false,
          "legendFormat": "{{job}} 进程已打开 fd 数",
          "range": true,
          "refId": "进程最大可打开的 fd"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "(node_filesystem_size_bytes{instance=~\"$host\", fstype=~\"ext[3-5]+|xfs|zfs|btrfs\"} - node_filesystem_free_bytes{instance=~\"$host\", fstype=~\"ext[3-5]+|xfs|zfs|btrfs\"}) / node_filesystem_size_bytes{instance=~\"$host\", fstype=~\"ext[3-5]+|xfs|zfs|btrfs\"}",
          "hide": false,
          "interval": "5m",
          "legendFormat": "{{job}} 进程 fd 使用率",
          "range": true,
          "refId": "进程 fd 使用率"
        }
      ],
      "title": "进程 fd 使用情况",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "1 只读 \n0 读写\n\n磁盘（分区）变为 ReadOnly 的常见原因\n\n-   文件系统错误\n-   磁盘坏道\n-   RAID卡故障\n-   inode资源耗尽\n-   IO繁忙\n-   硬盘背板故障\n-   硬盘线缆故障\n-   HBA 卡故障\n-   内核相关硬件驱动 bug\n-   FW 固件类问题\n-   系统没有正常关机，也会导致磁盘出现文件系统错误\n",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "axisSoftMax": 1,
            "axisSoftMin": 0,
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 8,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "none"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byRegexp",
              "options": "/.*状态.*/"
            },
            "properties": [
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "0": {
                        "color": "green",
                        "index": 0,
                        "text": "rw"
                      },
                      "1": {
                        "color": "red",
                        "index": 1,
                        "text": "ro"
                      }
                    },
                    "type": "value"
                  }
                ]
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 8,
        "x": 9,
        "y": 67
      },
      "id": 70,
      "options": {
        "legend": {
          "calcs": [
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "node_filesystem_readonly{instance=\"$host\",fstype=~'ext.*|xfs|zfs|btrfs'}",
          "legendFormat": "{{device}}---{{fstype}}---{{mountpoint}}  当前状态",
          "range": true,
          "refId": "Read only 状态的挂载点"
        }
      ],
      "title": "处于 Read only 状态的挂载点",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "1 采集失败\n0 采集成功",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 8,
            "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": [
          {
            "matcher": {
              "id": "byRegexp",
              "options": "/.*状态.*/"
            },
            "properties": [
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "0": {
                        "color": "light-green",
                        "index": 0,
                        "text": "正常"
                      },
                      "1": {
                        "color": "light-red",
                        "index": 1,
                        "text": "失败"
                      }
                    },
                    "type": "value"
                  }
                ]
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 7,
        "x": 17,
        "y": 67
      },
      "id": 71,
      "options": {
        "legend": {
          "calcs": [
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "node_filesystem_device_error{instance=\"$host\",fstype=~'ext.*|xfs|zfs|btrfs'}",
          "legendFormat": "{{device}}---{{fstype}}---{{mountpoint}}  当前状态",
          "range": true,
          "refId": "Read only 状态的挂载点"
        }
      ],
      "title": "采集中出现错误的挂载点",
      "type": "timeseries"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 75
      },
      "id": 73,
      "panels": [],
      "title": "磁盘IO：【$select_hostname】",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "对应 `iostat -dxk 1 -p <device>` 的 `r/s` 与 `w/s`",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisGridShow": false,
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 15,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "pointSize": 8,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "decimals": 0,
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "iops"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "vda 每秒处理磁盘读请求数"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "light-green",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "vda 每秒处理磁盘写请求数"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "light-blue",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 8,
        "x": 0,
        "y": 76
      },
      "id": 60,
      "options": {
        "legend": {
          "calcs": [
            "max",
            "min",
            "mean",
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "sum by (device) (irate(node_disk_reads_completed_total{instance=~\"$host\", device=~\"vd[a-z]+\"}[$interval]))",
          "legendFormat": "{{device}} 每秒处理磁盘读请求数",
          "range": true,
          "refId": "平均每秒处理磁盘读请求数"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "sum by (device) (irate(node_disk_writes_completed_total{instance=~\"$host\", device=~\"vd[a-z]+\"}[$interval]))",
          "hide": false,
          "legendFormat": "{{device}} 每秒处理磁盘写请求数",
          "range": true,
          "refId": "每秒处理磁盘写请求数"
        }
      ],
      "title": "磁盘 iops",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "对应 `iostat -dxk 1 -p <device>` 的 `rkB/s  ` 与 `wkB/s`",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 15,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "pointSize": 8,
            "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": "Bps"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "vda  读吞吐量"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "light-green",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "vda 写吞吐量"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "light-blue",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 8,
        "x": 8,
        "y": 76
      },
      "id": 61,
      "options": {
        "legend": {
          "calcs": [
            "max",
            "min",
            "mean",
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "sum by (device) (irate(node_disk_read_bytes_total{instance=~\"$host\", device=~\"vd[a-z]\"}[$interval]))",
          "legendFormat": "{{device}}  读吞吐量",
          "range": true,
          "refId": "平均每秒处理磁盘读带宽"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "sum by (device) (irate(node_disk_written_bytes_total{instance=~\"$host\", device=~\"vd[a-z]\"}[$interval]))",
          "hide": false,
          "legendFormat": "{{device}} 写吞吐量",
          "range": true,
          "refId": "平均每秒处理磁盘写带宽"
        }
      ],
      "title": "磁盘 r/w 吞吐量",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "图形数据出现中断主要是因为磁盘处于空闲状态，不用在意",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "points",
            "fillOpacity": 15,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "pointSize": 6,
            "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": "ms"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "vda 读请求耗时"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "light-green",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "vda 写请求耗时"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "super-light-blue",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 8,
        "x": 16,
        "y": 76
      },
      "id": 62,
      "options": {
        "legend": {
          "calcs": [
            "max",
            "min",
            "mean",
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "irate(node_disk_read_time_seconds_total{instance=~\"$host\", device=~\"vd[a-z]+\"}[$interval]) / irate(node_disk_reads_completed_total{instance=~\"$host\", device=~\"vd[a-z]+\"}[$interval]) * 1000",
          "hide": false,
          "legendFormat": "{{device}} 读请求耗时",
          "range": true,
          "refId": "磁盘读请求延迟 ms"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "irate(node_disk_write_time_seconds_total{instance=~\"$host\", device=~\"vd[a-z]+\"}[$interval]) / irate(node_disk_writes_completed_total{instance=~\"$host\", device=~\"vd[a-z]+\"}[$interval]) * 1000",
          "hide": false,
          "legendFormat": "{{device}} 写请求耗时",
          "range": true,
          "refId": "磁盘写请求耗时 ms"
        }
      ],
      "title": "磁盘平均 r/w 请求耗时 ms",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "每秒 CPU 花费在各磁盘设备 IO 上的时间占比（这个指标不怎么靠谱，在 ssd、raid 场景总不能反应设备真实饱和，仅作参考）\n\n对应 `iostat -dxk 1 -p <device>` 中的 `%util` 列",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "points",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "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": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 84
      },
      "id": 63,
      "options": {
        "legend": {
          "calcs": [
            "max",
            "min",
            "mean",
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "rate(node_disk_io_time_seconds_total{instance=~\"$host\"}[$interval])",
          "hide": false,
          "legendFormat": "{{device}} I/O Util",
          "range": true,
          "refId": "B"
        }
      ],
      "title": "花费磁盘 IO 时长占比",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "对应 `iostat -dxk 1 -p <device>` 的 `rrqm/s` 与 `wrqm/s`",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisGridShow": true,
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 15,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "pointSize": 8,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "decimals": 0,
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "iops"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "vda 每秒合并磁盘 read 请求数"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "super-light-green",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "vda 每秒合并磁盘 write 请求数"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "super-light-blue",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 84
      },
      "id": 68,
      "options": {
        "legend": {
          "calcs": [
            "max",
            "min",
            "mean",
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "sum by (device) (irate(node_disk_reads_merged_total{instance=~\"$host\", device=~\"vd[a-z]+\"}[$interval]))",
          "hide": false,
          "legendFormat": "{{device}} 每秒合并磁盘 read 请求数",
          "range": true,
          "refId": "平均每秒合并磁盘读请求数"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "sum by (device) (irate(node_disk_writes_merged_total{instance=~\"$host\", device=~\"vd[a-z]+\"}[$interval]))",
          "hide": false,
          "legendFormat": "{{device}} 每秒合并磁盘 write 请求数",
          "range": true,
          "refId": "每秒处理合并磁盘写请求数"
        }
      ],
      "title": "磁盘 io 合并请求",
      "type": "timeseries"
    }
  ],
  "refresh": "",
  "revision": 1,
  "schemaVersion": 38,
  "style": "dark",
  "tags": [
    "linux",
    "node_exporter",
    "centos7",
    "prometheus"
  ],
  "templating": {
    "list": [
      {
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_VICTORIAMETRICS}"
        },
        "definition": "up{job=~\"node.*\"}",
        "description": "选择监控的服务器节点",
        "hide": 0,
        "includeAll": false,
        "label": "选择节点",
        "multi": false,
        "name": "host",
        "options": [],
        "query": {
          "query": "up{job=~\"node.*\"}",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": ".*instance=\"(.*?)\".*",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      },
      {
        "auto": false,
        "auto_count": 30,
        "auto_min": "10s",
        "current": {
          "selected": false,
          "text": "1m",
          "value": "1m"
        },
        "hide": 0,
        "label": "时间间隔",
        "name": "interval",
        "options": [
          {
            "selected": true,
            "text": "1m",
            "value": "1m"
          },
          {
            "selected": false,
            "text": "10m",
            "value": "10m"
          },
          {
            "selected": false,
            "text": "30m",
            "value": "30m"
          },
          {
            "selected": false,
            "text": "1h",
            "value": "1h"
          },
          {
            "selected": false,
            "text": "6h",
            "value": "6h"
          },
          {
            "selected": false,
            "text": "12h",
            "value": "12h"
          },
          {
            "selected": false,
            "text": "1d",
            "value": "1d"
          }
        ],
        "query": "1m,10m,30m,1h,6h,12h,1d",
        "queryValue": "",
        "refresh": 2,
        "skipUrlSync": false,
        "type": "interval"
      },
      {
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_VICTORIAMETRICS}"
        },
        "definition": "query_result(count(node_uname_info{job=~\"node.*\"}))",
        "hide": 2,
        "includeAll": false,
        "label": "主机数",
        "multi": false,
        "name": "total_host",
        "options": [],
        "query": {
          "query": "query_result(count(node_uname_info{job=~\"node.*\"}))",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "/.*\\s(\\d+)\\s.*/",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      },
      {
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_VICTORIAMETRICS}"
        },
        "definition": "label_values(node_uname_info{instance=~\"$host\"}, nodename)",
        "hide": 2,
        "includeAll": false,
        "label": "已选择节点",
        "multi": false,
        "name": "select_hostname",
        "options": [],
        "query": {
          "query": "label_values(node_uname_info{instance=~\"$host\"}, nodename)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "Linux 系统节点状态大盘",
  "uid": "2111yPBuzBVz11",
  "version": 8,
  "weekStart": ""
}