Grafana dashboard: Loki v2 Events Dashboard for Kubernetes
Description: Kubernetes Events Dashboard  by CloudXiaobai

使用面板前需要先安装kubernetes-event-exporter

[Kubernetes-Event-Exporter Installation](https://github.com/opsgenie/kubernetes-event-exporter/tree/master/deploy)

### 使用说明

#### 1. kubernetes-event-exporter日志会打印到stdout，需要log agent采集到loki

#### 2. 下载并导入模版 “Loki v2 Events Dashboard for Kubernetes“

#### 3. 修改LogQL语句

```
{job="kubernetes-event-exporter"} 替换成自己的label
```

 更详细的操作请关注我的公众号

---
关注『云原生小白』公众号回复「入群」，加入Loki学习群，一起搬砖...

![](https://github.com/CloudmindsRobot/dagger/blob/main/docs/qrcode.jpg?raw=true)

{
  "__inputs": [
    {
      "name": "DS_LOKI",
      "label": "Loki",
      "description": "",
      "type": "datasource",
      "pluginId": "loki",
      "pluginName": "Loki"
    },
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "7.4.3"
    },
    {
      "type": "panel",
      "id": "grafana-piechart-panel",
      "name": "Pie Chart",
      "version": "1.3.8"
    },
    {
      "type": "datasource",
      "id": "loki",
      "name": "Loki",
      "version": "1.0.0"
    },
    {
      "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": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "description": "Kubernetes Events Dashboard  by CloudXiaobai",
  "editable": true,
  "gnetId": 14003,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "panels": [
    {
      "datasource": "${DS_LOKI}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "bars",
            "fillOpacity": 100,
            "gradientMode": "none",
            "hideFrom": {
              "graph": false,
              "legend": false,
              "tooltip": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": true
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 0
      },
      "id": 2,
      "interval": "1m",
      "maxDataPoints": null,
      "options": {
        "graph": {},
        "legend": {
          "calcs": [
            "mean",
            "sum"
          ],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltipOptions": {
          "mode": "single"
        }
      },
      "pluginVersion": "7.4.3",
      "targets": [
        {
          "expr": "sum by (type) (count_over_time({job=\"kubernetes-event-exporter\"}| json |  __error__=\"\" [$__interval]))",
          "instant": false,
          "legendFormat": "{{type}}",
          "range": true,
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Kubernetes事件",
      "transparent": true,
      "type": "timeseries"
    },
    {
      "datasource": "${DS_LOKI}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 29,
            "gradientMode": "hue",
            "hideFrom": {
              "graph": false,
              "legend": false,
              "tooltip": false
            },
            "lineInterpolation": "smooth",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": true
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "dark-red",
                "value": null
              },
              {
                "color": "red",
                "value": 1
              }
            ]
          },
          "unit": "short"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Warning"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "dark-red",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 0
      },
      "id": 3,
      "interval": "1m",
      "options": {
        "graph": {},
        "legend": {
          "calcs": [
            "sum"
          ],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltipOptions": {
          "mode": "single"
        }
      },
      "pluginVersion": "7.4.0-beta1",
      "targets": [
        {
          "expr": "sum(count_over_time({job=\"kubernetes-event-exporter\"}| json | type = \"Warning\" | __error__=\"\" [$__interval]))",
          "instant": false,
          "legendFormat": "Warning",
          "range": true,
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Warnning事件",
      "transparent": true,
      "type": "timeseries"
    },
    {
      "collapsed": false,
      "datasource": "${DS_PROMETHEUS}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 8
      },
      "id": 18,
      "panels": [],
      "title": "Kubernetes Events Latest 24h",
      "type": "row"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_LOKI}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {},
          "mappings": [],
          "noValue": "镜像拉取失败 0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#eab839",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 0
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 0,
        "y": 9
      },
      "hideTimeOverride": true,
      "id": 10,
      "interval": "1m",
      "links": [],
      "maxDataPoints": null,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value_and_name"
      },
      "pluginVersion": "7.4.3",
      "targets": [
        {
          "expr": "sum(count_over_time({job=\"kubernetes-event-exporter\"}|= \"Error: ImagePullBackOff\" | json | reason = \"Failed\"  | line_format \"{{ .message }}\"| __error__=\"\"[$__interval]))",
          "instant": false,
          "legendFormat": "镜像拉取失败",
          "range": true,
          "refId": "A"
        }
      ],
      "timeFrom": "30h",
      "timeShift": null,
      "title": "",
      "transparent": true,
      "type": "stat"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_LOKI}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {},
          "mappings": [],
          "noValue": "调度失败 0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#eab839",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 0
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 4,
        "y": 9
      },
      "hideTimeOverride": true,
      "id": 12,
      "interval": "1m",
      "links": [],
      "maxDataPoints": null,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value_and_name"
      },
      "pluginVersion": "7.4.3",
      "targets": [
        {
          "expr": "sum(count_over_time({job=\"kubernetes-event-exporter\"}| json | reason = \"FailedScheduling\"| __error__=\"\"[$__interval]))",
          "instant": false,
          "legendFormat": "调度失败",
          "range": true,
          "refId": "A"
        }
      ],
      "timeFrom": "30h",
      "timeShift": null,
      "title": "",
      "transparent": true,
      "type": "stat"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_LOKI}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {},
          "mappings": [],
          "noValue": "资源成功删除 0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#eab839",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 0
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 8,
        "y": 9
      },
      "hideTimeOverride": true,
      "id": 6,
      "interval": "1m",
      "links": [],
      "maxDataPoints": null,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value_and_name"
      },
      "pluginVersion": "7.4.3",
      "targets": [
        {
          "expr": "sum(count_over_time({job=\"kubernetes-event-exporter\"}| json | reason = \"SuccessfulDelete\"| __error__=\"\"[$__interval]))",
          "instant": false,
          "legendFormat": "资源成功删除",
          "range": true,
          "refId": "A"
        }
      ],
      "timeFrom": "24h",
      "timeShift": null,
      "title": "",
      "transparent": true,
      "type": "stat"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_LOKI}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {},
          "mappings": [],
          "noValue": "探针失败 0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#eab839",
                "value": null
              },
              {
                "color": "#eab839",
                "value": 0
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 12,
        "y": 9
      },
      "hideTimeOverride": true,
      "id": 5,
      "interval": "1m",
      "links": [],
      "maxDataPoints": null,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value_and_name"
      },
      "pluginVersion": "7.4.3",
      "targets": [
        {
          "expr": "sum(count_over_time({job=\"kubernetes-event-exporter\"} |= \"failed liveness probe\"| json | reason = \"Killing\"| __error__=\"\"[$__interval]))",
          "instant": false,
          "legendFormat": "探针失败",
          "range": true,
          "refId": "A"
        }
      ],
      "timeFrom": "24h",
      "timeShift": null,
      "title": "",
      "transparent": true,
      "type": "stat"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_LOKI}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {},
          "mappings": [],
          "noValue": "Null ConntrackFull",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#eab839",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 0
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 16,
        "y": 9
      },
      "hideTimeOverride": true,
      "id": 23,
      "interval": "1m",
      "links": [],
      "maxDataPoints": null,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "/^SuccessfulDelete$/",
          "values": false
        },
        "text": {},
        "textMode": "value_and_name"
      },
      "pluginVersion": "7.4.3",
      "targets": [
        {
          "expr": "sum(count_over_time({job=\"kubernetes-event-exporter\"}|= \"Marking for deletion Pod\"| json | reason = \"ConntrackFull\"| __error__=\"\"[$__interval]))",
          "instant": false,
          "legendFormat": "ConntrackFull",
          "range": true,
          "refId": "A"
        }
      ],
      "timeFrom": "24h",
      "timeShift": null,
      "title": "",
      "transparent": true,
      "type": "stat"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_LOKI}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {},
          "mappings": [],
          "noValue": "节点重启 0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#eab839",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 0
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 20,
        "y": 9
      },
      "hideTimeOverride": true,
      "id": 8,
      "interval": "1m",
      "links": [],
      "maxDataPoints": null,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value_and_name"
      },
      "pluginVersion": "7.4.3",
      "targets": [
        {
          "expr": "sum(count_over_time({job=\"kubernetes-event-exporter\"}| json | reason = \"Rebooted\"| __error__=\"\"[$__interval]))",
          "instant": false,
          "legendFormat": "节点重启",
          "range": true,
          "refId": "A"
        }
      ],
      "timeFrom": "30h",
      "timeShift": null,
      "title": "",
      "transparent": true,
      "type": "stat"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_LOKI}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {},
          "mappings": [],
          "noValue": "容器OOM 0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#eab839",
                "value": null
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 0,
        "y": 13
      },
      "hideTimeOverride": true,
      "id": 11,
      "interval": "1m",
      "links": [],
      "maxDataPoints": null,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "/^Killing Pods$/",
          "values": false
        },
        "text": {},
        "textMode": "value_and_name"
      },
      "pluginVersion": "7.4.3",
      "targets": [
        {
          "expr": "sum(count_over_time({job=\"kubernetes-event-exporter\"} | json | reason = \"OOMKilling\"| __error__=\"\"[$__interval]))",
          "instant": false,
          "legendFormat": "容器OOM",
          "range": true,
          "refId": "A"
        }
      ],
      "timeFrom": "24h",
      "timeShift": null,
      "title": "",
      "transparent": true,
      "type": "stat"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_LOKI}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {},
          "mappings": [
            {
              "from": "",
              "id": 1,
              "text": "",
              "to": "",
              "type": 1,
              "value": ""
            }
          ],
          "noValue": "DockerHung 0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#eab839",
                "value": null
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 4,
        "y": 13
      },
      "hideTimeOverride": true,
      "id": 4,
      "interval": "1m",
      "links": [],
      "maxDataPoints": null,
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "/^Probe Unhealthy$/",
          "values": false
        },
        "text": {},
        "textMode": "value_and_name"
      },
      "pluginVersion": "7.4.3",
      "targets": [
        {
          "expr": "sum(count_over_time({job=\"kubernetes-event-exporter\"}| json | reason = \"DockerHung\"| __error__=\"\"[$__interval]))",
          "instant": false,
          "legendFormat": "DockerHung",
          "range": true,
          "refId": "A"
        }
      ],
      "timeFrom": "24h",
      "timeShift": null,
      "title": "",
      "transparent": true,
      "type": "stat"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_LOKI}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {},
          "mappings": [],
          "noValue": "容器Crash 0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#eab839",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 0
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 8,
        "y": 13
      },
      "hideTimeOverride": true,
      "id": 14,
      "interval": "1m",
      "links": [],
      "maxDataPoints": null,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "/^SuccessfulDelete$/",
          "values": false
        },
        "text": {},
        "textMode": "value_and_name"
      },
      "pluginVersion": "7.4.3",
      "targets": [
        {
          "expr": "sum(count_over_time({job=\"kubernetes-event-exporter\"}| json | reason = \"BackOff\"| __error__=\"\"[$__interval]))",
          "instant": false,
          "legendFormat": "容器Crash",
          "range": true,
          "refId": "A"
        }
      ],
      "timeFrom": "24h",
      "timeShift": null,
      "title": "",
      "transparent": true,
      "type": "stat"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_LOKI}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {},
          "mappings": [],
          "noValue": "卷挂载失败 0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#eab839",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 0
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 12,
        "y": 13
      },
      "hideTimeOverride": true,
      "id": 9,
      "interval": "1m",
      "links": [],
      "maxDataPoints": null,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value_and_name"
      },
      "pluginVersion": "7.4.3",
      "targets": [
        {
          "expr": "sum(count_over_time({job=\"kubernetes-event-exporter\"}| json | reason = \"FailedMount\"| __error__=\"\"[$__interval]))",
          "instant": false,
          "legendFormat": "卷挂载失败",
          "range": true,
          "refId": "A"
        }
      ],
      "timeFrom": "30h",
      "timeShift": null,
      "title": "",
      "transparent": true,
      "type": "stat"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_LOKI}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {},
          "mappings": [],
          "noValue": "节点OOM 0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#eab839",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 0
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 16,
        "y": 13
      },
      "hideTimeOverride": true,
      "id": 7,
      "interval": "1m",
      "links": [],
      "maxDataPoints": null,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value_and_name"
      },
      "pluginVersion": "7.4.3",
      "targets": [
        {
          "expr": "sum(count_over_time({job=\"kubernetes-event-exporter\"}| json | reason = \"SystemOOM\"| __error__=\"\"[$__interval]))",
          "instant": false,
          "legendFormat": "节点OOM",
          "range": true,
          "refId": "A"
        }
      ],
      "timeFrom": "30h",
      "timeShift": null,
      "title": "",
      "transparent": true,
      "type": "stat"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_LOKI}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {},
          "mappings": [],
          "noValue": "容器驱逐 0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#eab839",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 0
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 20,
        "y": 13
      },
      "hideTimeOverride": true,
      "id": 13,
      "interval": "1m",
      "links": [],
      "maxDataPoints": null,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "/^SuccessfulDelete$/",
          "values": false
        },
        "text": {},
        "textMode": "value_and_name"
      },
      "pluginVersion": "7.4.3",
      "targets": [
        {
          "expr": "sum(count_over_time({job=\"kubernetes-event-exporter\"}|= \"Marking for deletion Pod\"| json | reason = \"TaintManagerEviction\"| __error__=\"\"[$__interval]))",
          "instant": false,
          "legendFormat": "容器驱逐",
          "range": true,
          "refId": "A"
        }
      ],
      "timeFrom": "24h",
      "timeShift": null,
      "title": "",
      "transparent": true,
      "type": "stat"
    },
    {
      "collapsed": false,
      "datasource": "${DS_PROMETHEUS}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 17
      },
      "id": 21,
      "panels": [],
      "title": "",
      "type": "row"
    },
    {
      "datasource": "${DS_LOKI}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": null,
            "displayMode": "auto",
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 0
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Field"
            },
            "properties": [
              {
                "id": "custom.align",
                "value": "center"
              },
              {
                "id": "custom.width",
                "value": 300
              },
              {
                "id": "color",
                "value": {
                  "mode": "thresholds"
                }
              },
              {
                "id": "displayName",
                "value": "Reason"
              },
              {
                "id": "custom.displayMode",
                "value": "color-background"
              },
              {
                "id": "color",
                "value": {
                  "fixedColor": "#eab839",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Total"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "gradient-gauge"
              },
              {
                "id": "color",
                "value": {
                  "mode": "continuous-BlYlRd"
                }
              },
              {
                "id": "custom.align",
                "value": "center"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 11,
        "w": 12,
        "x": 0,
        "y": 18
      },
      "id": 19,
      "interval": "1m",
      "maxDataPoints": null,
      "options": {
        "frameIndex": 1,
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Total"
          }
        ]
      },
      "pluginVersion": "7.4.3",
      "targets": [
        {
          "expr": "topk(10,sum by (reason) (count_over_time({job=\"kubernetes-event-exporter\"}| json | __error__=\"\"[$__interval])))",
          "instant": false,
          "legendFormat": "{{reason}}",
          "range": true,
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "TOP 10  Kubernetes Events",
      "transformations": [
        {
          "id": "reduce",
          "options": {
            "reducers": [
              "sum"
            ]
          }
        }
      ],
      "transparent": true,
      "type": "table"
    },
    {
      "aliasColors": {},
      "breakPoint": "50%",
      "cacheTimeout": null,
      "combine": {
        "label": "Others",
        "threshold": 0
      },
      "datasource": "${DS_LOKI}",
      "fieldConfig": {
        "defaults": {
          "color": {},
          "custom": {},
          "thresholds": {
            "mode": "absolute",
            "steps": []
          }
        },
        "overrides": []
      },
      "fontSize": "80%",
      "format": "short",
      "gridPos": {
        "h": 11,
        "w": 6,
        "x": 12,
        "y": 18
      },
      "id": 24,
      "interval": "1m",
      "legend": {
        "percentage": false,
        "show": true,
        "sideWidth": null,
        "values": false
      },
      "legendType": "Right side",
      "links": [],
      "maxDataPoints": null,
      "nullPointMode": "connected",
      "pieType": "donut",
      "pluginVersion": "7.4.0-beta1",
      "strokeWidth": 1,
      "targets": [
        {
          "expr": "sum(count_over_time({job=\"kubernetes-event-exporter\"}| json| __error__=\"\"[$__interval])) by (source_component)",
          "instant": false,
          "legendFormat": "{{source_component}}",
          "range": true,
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "事件源",
      "transparent": true,
      "type": "grafana-piechart-panel",
      "valueName": "total"
    },
    {
      "aliasColors": {},
      "breakPoint": "50%",
      "cacheTimeout": null,
      "combine": {
        "label": "Others",
        "threshold": 0
      },
      "datasource": "${DS_LOKI}",
      "fieldConfig": {
        "defaults": {
          "color": {},
          "custom": {},
          "thresholds": {
            "mode": "absolute",
            "steps": []
          }
        },
        "overrides": []
      },
      "fontSize": "80%",
      "format": "short",
      "gridPos": {
        "h": 11,
        "w": 6,
        "x": 18,
        "y": 18
      },
      "id": 25,
      "interval": "1m",
      "legend": {
        "percentage": false,
        "show": true,
        "sideWidth": null,
        "values": false
      },
      "legendType": "Right side",
      "links": [],
      "maxDataPoints": null,
      "nullPointMode": "connected",
      "pieType": "donut",
      "pluginVersion": "7.4.0-beta1",
      "strokeWidth": 1,
      "targets": [
        {
          "expr": "sum(count_over_time({job=\"kubernetes-event-exporter\"}| json| __error__=\"\"[$__interval])) by (involvedObject_kind)",
          "instant": false,
          "legendFormat": "{{involvedObject_kind}}",
          "range": true,
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "事件类型",
      "transparent": true,
      "type": "grafana-piechart-panel",
      "valueName": "total"
    },
    {
      "datasource": "${DS_LOKI}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": null,
            "displayMode": "auto",
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 0
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Metric"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "驱逐事件"
              },
              {
                "id": "custom.align",
                "value": null
              },
              {
                "id": "custom.displayMode",
                "value": "color-background"
              },
              {
                "id": "color",
                "value": {
                  "fixedColor": "#eab839",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 11,
        "w": 24,
        "x": 0,
        "y": 29
      },
      "id": 22,
      "interval": "1m",
      "maxDataPoints": null,
      "options": {
        "frameIndex": 1,
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Total"
          }
        ]
      },
      "pluginVersion": "7.4.3",
      "targets": [
        {
          "expr": "sum by (firstTimestamp,message) (count_over_time({job=\"kubernetes-event-exporter\"}|= \"Marking for deletion Pod\"| json | reason = \"TaintManagerEviction\"| __error__=\"\"[$__interval]))",
          "instant": false,
          "legendFormat": "{{firstTimestamp}}    发生事件 {{message}}",
          "range": true,
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "容器驱逐列表",
      "transformations": [
        {
          "id": "seriesToRows",
          "options": {}
        },
        {
          "id": "filterFieldsByName",
          "options": {
            "include": {
              "names": [
                "Metric"
              ]
            }
          }
        }
      ],
      "transparent": true,
      "type": "table"
    }
  ],
  "refresh": false,
  "schemaVersion": 27,
  "style": "dark",
  "tags": [
    "loki",
    "kubernetes",
    "events"
  ],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "Loki v2 Events Dashboard for Kubernetes",
  "uid": "kU9VjusMk",
  "version": 42
}