Grafana dashboard: Kubernetes Event Exporter
Description: Kubernetes Event Exporter - https://github.com/resmoio/kubernetes-event-exporter

# Kubernetes Event Exporter Dashboard

<https://github.com/resmoio/kubernetes-event-exporter>

- Search events with regex
- Filter events by source namespace globally
- Filter events by fields in table




{
  "__elements": {},
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "9.3.1"
    },
    {
      "type": "panel",
      "id": "logs",
      "name": "Logs",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "loki",
      "name": "Loki",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "piechart",
      "name": "Pie chart",
      "version": ""
    },
    {
      "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": "datasource",
          "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": "Kubernetes Event Exporter - https://github.com/resmoio/kubernetes-event-exporter",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "gnetId": 17882,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 34,
      "panels": [],
      "title": "Kubernetes Events - Details",
      "type": "row"
    },
    {
      "datasource": {
        "type": "loki",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "filterable": true,
            "inspect": false,
            "minWidth": 65
          },
          "links": [],
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "labels"
            },
            "properties": [
              {
                "id": "custom.filterable"
              },
              {
                "id": "custom.inspect",
                "value": true
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "type"
            },
            "properties": [
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "Normal": {
                        "color": "text",
                        "index": 1
                      },
                      "Warning": {
                        "color": "red",
                        "index": 0
                      }
                    },
                    "type": "value"
                  }
                ]
              },
              {
                "id": "custom.displayMode",
                "value": "color-text"
              },
              {
                "id": "custom.width",
                "value": 66
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "message"
            },
            "properties": [
              {
                "id": "custom.minWidth",
                "value": 280
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "involvedObject_name"
            },
            "properties": [
              {
                "id": "custom.minWidth",
                "value": 245
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "count"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 55
              }
            ]
          },
          {
            "matcher": {
              "id": "byType",
              "options": "time"
            },
            "properties": [
              {
                "id": "custom.filterable",
                "value": false
              },
              {
                "id": "unit",
                "value": "dateTimeFromNow"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "lastTimestamp"
            },
            "properties": [
              {
                "id": "custom.filterable"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 13,
        "w": 24,
        "x": 0,
        "y": 1
      },
      "id": 36,
      "links": [],
      "options": {
        "footer": {
          "enablePagination": true,
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "9.3.1",
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "${datasource}"
          },
          "editorMode": "code",
          "expr": "{container=\"event-exporter\"} |~ `(?i)$contains` | json | __error__=`` | metadata_namespace=~`$namespace`",
          "queryType": "range",
          "refId": "A"
        }
      ],
      "title": "Events Details",
      "transformations": [
        {
          "id": "extractFields",
          "options": {
            "replace": false,
            "source": "labels"
          }
        },
        {
          "id": "filterFieldsByName",
          "options": {
            "include": {
              "pattern": "/^(labels|type|message|metadata_namespace|involvedObject_kind|involvedObject_name|source_component|count|metadata_creationTimestamp|firstTimestamp|lastTimestamp)$/"
            }
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "firstTimestamp": true
            },
            "indexByName": {
              "count": 7,
              "firstTimestamp": 9,
              "involvedObject_kind": 4,
              "involvedObject_name": 5,
              "labels": 0,
              "lastTimestamp": 10,
              "message": 2,
              "metadata_creationTimestamp": 8,
              "metadata_namespace": 3,
              "source_component": 6,
              "type": 1
            },
            "renameByName": {
              "count": "Count",
              "firstTimestamp": "Age",
              "involvedObject_kind": "Kind",
              "involvedObject_name": "Involved Object",
              "labels": "Full event",
              "lastTimestamp": "Last Seen",
              "message": "Message",
              "metadata_creationTimestamp": "Created",
              "metadata_namespace": "Namespace",
              "source_component": "Source",
              "type": "Type"
            }
          }
        },
        {
          "id": "convertFieldType",
          "options": {
            "conversions": [
              {
                "destinationType": "time",
                "targetField": "metadata_creationTimestamp"
              }
            ],
            "fields": {}
          }
        },
        {
          "id": "sortBy",
          "options": {
            "fields": {},
            "sort": [
              {
                "desc": true,
                "field": "Last Seen"
              }
            ]
          }
        }
      ],
      "type": "table"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 14
      },
      "id": 32,
      "panels": [],
      "title": "Kubernetes Events - Stats",
      "type": "row"
    },
    {
      "datasource": {
        "type": "loki",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "left",
            "barAlignment": 0,
            "drawStyle": "bars",
            "fillOpacity": 100,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "normal"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 15
      },
      "id": 2,
      "interval": "1m",
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "${datasource}"
          },
          "editorMode": "code",
          "expr": "sum by (type) (count_over_time({container=\"event-exporter\"} | json | __error__=`` | metadata_namespace=~`$namespace` [$__interval]))",
          "legendFormat": "{{type}}",
          "queryType": "range",
          "refId": "A"
        }
      ],
      "title": "Overview",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "loki",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 29,
            "gradientMode": "hue",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "smooth",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": true,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "red",
                "value": null
              },
              {
                "color": "red",
                "value": 1
              }
            ]
          },
          "unit": "short"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Warning"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "red",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 15
      },
      "id": 4,
      "interval": "1m",
      "options": {
        "legend": {
          "calcs": [
            "sum"
          ],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "${datasource}"
          },
          "editorMode": "code",
          "expr": "sum(count_over_time({container=\"event-exporter\"} | json | __error__=`` | metadata_namespace=~`$namespace` | type=\"Warning\" [$__interval]))",
          "legendFormat": "Warning",
          "queryType": "range",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Warnings",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "loki",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "noValue": "0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "yellow",
                "value": null
              },
              {
                "color": "yellow",
                "value": 0
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 3,
        "x": 0,
        "y": 23
      },
      "id": 6,
      "interval": "1m",
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "last"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "9.3.1",
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "${datasource}"
          },
          "editorMode": "code",
          "expr": "sum(count_over_time({container=\"event-exporter\"} |= \"Error: ImagePullBackOff\" | json | __error__=`` | metadata_namespace=~`$namespace` | reason=\"Failed\"  | line_format \"{{ .message }}\" [$__interval]))",
          "legendFormat": "",
          "queryType": "range",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Image Pull Failed",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "loki",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "noValue": "0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "yellow",
                "value": null
              },
              {
                "color": "yellow",
                "value": 0
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 3,
        "x": 3,
        "y": 23
      },
      "id": 14,
      "interval": "1m",
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "last"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "9.3.1",
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "${datasource}"
          },
          "editorMode": "code",
          "expr": "sum(count_over_time({container=\"event-exporter\"} |= \"failed liveness probe\" | json | __error__=`` | metadata_namespace=~`$namespace` | reason=\"Killing\" [$__interval]))",
          "queryType": "range",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Liveness Probe Failed",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "loki",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "noValue": "0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "yellow",
                "value": null
              },
              {
                "color": "yellow",
                "value": 0
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 3,
        "x": 6,
        "y": 23
      },
      "id": 41,
      "interval": "1m",
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "last"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "9.3.1",
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "${datasource}"
          },
          "editorMode": "code",
          "expr": "sum(count_over_time({container=\"event-exporter\"} | json | __error__=`` | metadata_namespace=~`$namespace` | reason=\"FailedMount\" [$__interval]))",
          "queryType": "range",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Volume Mount Failed",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "loki",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "noValue": "0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "yellow",
                "value": null
              },
              {
                "color": "yellow",
                "value": 0
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 3,
        "x": 9,
        "y": 23
      },
      "id": 16,
      "interval": "1m",
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "last"
          ],
          "fields": "",
          "values": false
        },
        "text": {
          "valueSize": 0
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.3.1",
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "${datasource}"
          },
          "editorMode": "code",
          "expr": "sum(count_over_time({container=\"event-exporter\"} | json | __error__=`` | metadata_namespace=~`$namespace` | reason=\"FailedScheduling\" [$__interval]))",
          "queryType": "range",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Scheduling Failed",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "loki",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "noValue": "0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "yellow",
                "value": null
              },
              {
                "color": "yellow",
                "value": 0
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 3,
        "x": 12,
        "y": 23
      },
      "id": 10,
      "interval": "1m",
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "last"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "9.3.1",
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "${datasource}"
          },
          "editorMode": "code",
          "expr": "sum(count_over_time({container=\"event-exporter\"} | json | __error__=`` | metadata_namespace=~`$namespace` | reason=\"OOMKilling\" [$__interval]))",
          "queryType": "range",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Container OOM Killed",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "loki",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "mappings": [],
          "noValue": "0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "yellow",
                "value": null
              },
              {
                "color": "yellow",
                "value": 0
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 3,
        "x": 15,
        "y": 23
      },
      "id": 12,
      "interval": "1m",
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "last"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.3.1",
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "${datasource}"
          },
          "editorMode": "code",
          "expr": "sum(count_over_time({container=\"event-exporter\"} | json | __error__=`` | metadata_namespace=~`$namespace` | reason=\"BackOff\" [$__interval]))",
          "queryType": "range",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Container Crashed",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "loki",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "noValue": "0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "yellow",
                "value": null
              },
              {
                "color": "yellow",
                "value": 0
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 3,
        "x": 18,
        "y": 23
      },
      "id": 18,
      "interval": "1m",
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "last"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "9.3.1",
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "${datasource}"
          },
          "editorMode": "code",
          "expr": "sum(count_over_time({container=\"event-exporter\"} |= \"Marking for deletion Pod\" | json | __error__=`` | metadata_namespace=~`$namespace` | reason=\"TaintManagerEviction\" [$__interval]))",
          "queryType": "range",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Pod Evicted",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "loki",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "mappings": [],
          "noValue": "0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "yellow",
                "value": null
              },
              {
                "color": "yellow",
                "value": 0
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 3,
        "x": 21,
        "y": 23
      },
      "id": 40,
      "interval": "1m",
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "last"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.3.1",
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "${datasource}"
          },
          "editorMode": "code",
          "expr": "sum(count_over_time({container=\"event-exporter\"} | json | __error__=`` | metadata_namespace=~`$namespace` | reason=\"SystemOOM\" [$__interval]))",
          "queryType": "range",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "System OOM",
      "type": "stat"
    },
    {
      "collapsed": true,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 28
      },
      "id": 30,
      "panels": [
        {
          "datasource": {
            "type": "loki",
            "uid": "${datasource}"
          },
          "description": "",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                }
              },
              "mappings": []
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "Field"
                },
                "properties": [
                  {
                    "id": "color",
                    "value": {
                      "mode": "thresholds"
                    }
                  },
                  {
                    "id": "displayName",
                    "value": "Reason"
                  },
                  {
                    "id": "color",
                    "value": {
                      "fixedColor": "#eab839",
                      "mode": "fixed"
                    }
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Total"
                },
                "properties": [
                  {
                    "id": "color",
                    "value": {
                      "mode": "continuous-BlYlRd"
                    }
                  }
                ]
              },
              {
                "__systemRef": "hideSeriesFrom",
                "matcher": {
                  "id": "byNames",
                  "options": {
                    "mode": "exclude",
                    "names": [
                      "Completed",
                      "Created",
                      "FreeDiskSpaceFailed",
                      "InProgress",
                      "JobAlreadyActive",
                      "Killing",
                      "Pulled",
                      "Pulling",
                      "SawCompletedJob",
                      "Scheduled",
                      "SnapshotDelete",
                      "SnapshotError",
                      "SnapshotUpdate",
                      "Started",
                      "SuccessfulCreate",
                      "SuccessfulDelete",
                      "Unhealthy",
                      "Valid",
                      "nodeAssigned",
                      "unchanged",
                      "Value"
                    ],
                    "prefix": "All except:",
                    "readOnly": true
                  }
                },
                "properties": [
                  {
                    "id": "custom.hideFrom",
                    "value": {
                      "legend": false,
                      "tooltip": false,
                      "viz": true
                    }
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 14,
            "w": 6,
            "x": 0,
            "y": 29
          },
          "id": 26,
          "interval": "1m",
          "options": {
            "legend": {
              "displayMode": "list",
              "placement": "bottom",
              "showLegend": true
            },
            "pieType": "pie",
            "reduceOptions": {
              "calcs": [
                "sum"
              ],
              "fields": "",
              "values": false
            },
            "tooltip": {
              "mode": "multi",
              "sort": "none"
            }
          },
          "pluginVersion": "9.3.1",
          "targets": [
            {
              "datasource": {
                "type": "loki",
                "uid": "${datasource}"
              },
              "editorMode": "code",
              "expr": "sum by (reason) (count_over_time({container=\"event-exporter\"} | json | __error__=`` | metadata_namespace=~`$namespace` [$__interval]))",
              "instant": false,
              "legendFormat": "{{reason}}",
              "queryType": "range",
              "range": true,
              "refId": "A"
            }
          ],
          "title": "Events by Reason",
          "transformations": [],
          "type": "piechart"
        },
        {
          "datasource": {
            "type": "loki",
            "uid": "${datasource}"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                }
              },
              "mappings": []
            },
            "overrides": []
          },
          "gridPos": {
            "h": 14,
            "w": 6,
            "x": 6,
            "y": 29
          },
          "id": 28,
          "interval": "1m",
          "options": {
            "displayLabels": [],
            "legend": {
              "displayMode": "list",
              "placement": "bottom",
              "showLegend": true
            },
            "pieType": "pie",
            "reduceOptions": {
              "calcs": [
                "sum"
              ],
              "fields": "",
              "values": false
            },
            "tooltip": {
              "mode": "multi",
              "sort": "none"
            }
          },
          "targets": [
            {
              "datasource": {
                "type": "loki",
                "uid": "${datasource}"
              },
              "editorMode": "code",
              "expr": "sum by (metadata_namespace) (count_over_time({container=\"event-exporter\"} | json | __error__=`` | metadata_namespace=~`$namespace` [$__interval]))",
              "legendFormat": "{{metadata_namespace}}",
              "queryType": "range",
              "range": true,
              "refId": "A"
            }
          ],
          "title": "Events by Namespace",
          "type": "piechart"
        },
        {
          "datasource": {
            "type": "loki",
            "uid": "${datasource}"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                }
              },
              "mappings": []
            },
            "overrides": []
          },
          "gridPos": {
            "h": 14,
            "w": 6,
            "x": 12,
            "y": 29
          },
          "id": 20,
          "interval": "1m",
          "options": {
            "legend": {
              "displayMode": "list",
              "placement": "bottom",
              "showLegend": true
            },
            "pieType": "pie",
            "reduceOptions": {
              "calcs": [
                "sum"
              ],
              "fields": "",
              "values": false
            },
            "tooltip": {
              "mode": "multi",
              "sort": "none"
            }
          },
          "targets": [
            {
              "datasource": {
                "type": "loki",
                "uid": "${datasource}"
              },
              "editorMode": "code",
              "expr": "sum by (source_component) (count_over_time({container=\"event-exporter\"} | json | __error__=`` | metadata_namespace=~`$namespace` [$__interval]))",
              "legendFormat": "{{source_component}}",
              "queryType": "range",
              "range": true,
              "refId": "A"
            }
          ],
          "title": "Events by Source",
          "type": "piechart"
        },
        {
          "datasource": {
            "type": "loki",
            "uid": "${datasource}"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                }
              },
              "links": [],
              "mappings": []
            },
            "overrides": []
          },
          "gridPos": {
            "h": 14,
            "w": 6,
            "x": 18,
            "y": 29
          },
          "id": 22,
          "interval": "1m",
          "options": {
            "legend": {
              "displayMode": "list",
              "placement": "bottom",
              "showLegend": true,
              "values": []
            },
            "pieType": "pie",
            "reduceOptions": {
              "calcs": [
                "sum"
              ],
              "fields": "",
              "values": false
            },
            "tooltip": {
              "mode": "multi",
              "sort": "none"
            }
          },
          "targets": [
            {
              "datasource": {
                "type": "loki",
                "uid": "${datasource}"
              },
              "editorMode": "code",
              "expr": "sum by (involvedObject_kind) (count_over_time({container=\"event-exporter\"} | json | __error__=`` | metadata_namespace=~`$namespace` [$__interval]))",
              "legendFormat": "{{involvedObject_kind}}",
              "queryType": "range",
              "range": true,
              "refId": "A"
            }
          ],
          "title": "Events by Kind",
          "type": "piechart"
        }
      ],
      "title": "Kubernetes Events - Distribution",
      "type": "row"
    },
    {
      "collapsed": true,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 29
      },
      "id": 38,
      "panels": [
        {
          "datasource": {
            "type": "loki",
            "uid": "${datasource}"
          },
          "gridPos": {
            "h": 13,
            "w": 24,
            "x": 0,
            "y": 44
          },
          "id": 8,
          "options": {
            "dedupStrategy": "none",
            "enableLogDetails": true,
            "prettifyLogMessage": false,
            "showCommonLabels": false,
            "showLabels": false,
            "showTime": true,
            "sortOrder": "Descending",
            "wrapLogMessage": false
          },
          "targets": [
            {
              "datasource": {
                "type": "loki",
                "uid": "${datasource}"
              },
              "editorMode": "code",
              "expr": "{container=\"event-exporter\"} |~ `(?i)$contains` | json | __error__=`` | metadata_namespace=~`$namespace`",
              "queryType": "range",
              "range": true,
              "refId": "A"
            }
          ],
          "type": "logs"
        }
      ],
      "title": "Kubernetes Events - Raw Logs",
      "type": "row"
    }
  ],
  "refresh": "1m",
  "schemaVersion": 37,
  "style": "dark",
  "tags": [
    "loki"
  ],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "Loki",
          "value": "Loki"
        },
        "hide": 0,
        "includeAll": false,
        "label": "datasource",
        "multi": false,
        "name": "datasource",
        "options": [],
        "query": "loki",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "allValue": ".*",
        "current": {},
        "datasource": {
          "type": "loki",
          "uid": "${datasource}"
        },
        "definition": "",
        "hide": 0,
        "includeAll": true,
        "multi": true,
        "name": "namespace",
        "options": [],
        "query": {
          "label": "namespace",
          "refId": "LokiVariableQueryEditor-VariableQuery",
          "stream": "",
          "type": 1
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 5,
        "type": "query"
      },
      {
        "current": {
          "selected": false,
          "text": "",
          "value": ""
        },
        "description": "Line contains case insensitive. Return log lines that match regex (?i)",
        "hide": 0,
        "label": "Search events",
        "name": "contains",
        "options": [
          {
            "selected": true,
            "text": "",
            "value": ""
          }
        ],
        "query": "",
        "skipUrlSync": false,
        "type": "textbox"
      }
    ]
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "Kubernetes Event Exporter",
  "uid": "kubernetes-event-exporter",
  "version": 3,
  "weekStart": ""
}