Files
kube-forge-dist/grafana/dashboards/Kubernetes events-1709714734146.json

1138 lines
28 KiB
JSON

{
"__inputs": [
{
"name": "DS_KUBE-LOKI",
"label": "Kube-loki",
"description": "",
"type": "datasource",
"pluginId": "loki",
"pluginName": "Loki"
},
{
"name": "DS_KUBE-PROMETHEUS",
"label": "Kube-prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__elements": {},
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "10.0.2"
},
{
"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": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"description": "",
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "loki",
"uid": "${DS_KUBE-LOKI}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": -1,
"drawStyle": "points",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineStyle": {
"fill": "solid"
},
"lineWidth": 1,
"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
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 10,
"w": 24,
"x": 0,
"y": 0
},
"id": 3,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "asc"
}
},
"pluginVersion": "10.0.2",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${DS_KUBE-LOKI}"
},
"editorMode": "builder",
"expr": "count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\", count=\"count\" | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range]))",
"hide": false,
"legendFormat": "{{name}}",
"queryType": "range",
"refId": "A"
},
{
"datasource": {
"type": "loki",
"uid": "${DS_KUBE-LOKI}"
},
"editorMode": "builder",
"expr": "count(rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\" | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range]))",
"hide": false,
"legendFormat": "Overall",
"queryType": "range",
"refId": "B"
}
],
"title": "Timeline",
"transformations": [
{
"id": "extractFields",
"options": {
"format": "json",
"keepTime": false,
"replace": false,
"source": "Line"
}
}
],
"type": "timeseries"
},
{
"datasource": {
"type": "loki",
"uid": "${DS_KUBE-LOKI}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 1
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 3,
"x": 0,
"y": 10
},
"id": 11,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "10.0.2",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${DS_KUBE-LOKI}"
},
"editorMode": "builder",
"expr": "sum(count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\" | reason = `OOMKilled` | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range])))",
"queryType": "range",
"refId": "A"
}
],
"title": "OOMKilled",
"type": "stat"
},
{
"datasource": {
"type": "loki",
"uid": "${DS_KUBE-LOKI}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 1
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 3,
"x": 3,
"y": 10
},
"id": 12,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "10.0.2",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${DS_KUBE-LOKI}"
},
"editorMode": "builder",
"expr": "sum(count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\" | reason = `Evicted` | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range])))",
"queryType": "range",
"refId": "A"
}
],
"title": "Evicted",
"type": "stat"
},
{
"datasource": {
"type": "loki",
"uid": "${DS_KUBE-LOKI}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 1
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 3,
"x": 6,
"y": 10
},
"id": 6,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "10.0.2",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${DS_KUBE-LOKI}"
},
"editorMode": "builder",
"expr": "sum(count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\" | reason = `BackOff` | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range])))",
"queryType": "range",
"refId": "A"
}
],
"title": "BackOff",
"type": "stat"
},
{
"datasource": {
"type": "loki",
"uid": "${DS_KUBE-LOKI}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 1
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 3,
"x": 9,
"y": 10
},
"id": 13,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "10.0.2",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${DS_KUBE-LOKI}"
},
"editorMode": "builder",
"expr": "sum(count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\", count=\"count\" | reason = `ImagePullBackOff` | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range])))",
"queryType": "range",
"refId": "A"
}
],
"title": "ImagePullBackOff",
"transformations": [
{
"id": "extractFields",
"options": {
"format": "json",
"source": "Line"
}
}
],
"type": "stat"
},
{
"datasource": {
"type": "loki",
"uid": "${DS_KUBE-LOKI}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 1
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 3,
"x": 12,
"y": 10
},
"id": 5,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "10.0.2",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${DS_KUBE-LOKI}"
},
"editorMode": "builder",
"expr": "sum(count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\" | reason = `Failed` | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range])))",
"queryType": "range",
"refId": "A"
}
],
"title": "Failed",
"type": "stat"
},
{
"datasource": {
"type": "loki",
"uid": "${DS_KUBE-LOKI}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 1
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 3,
"x": 15,
"y": 10
},
"id": 7,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "10.0.2",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${DS_KUBE-LOKI}"
},
"editorMode": "builder",
"expr": "sum(count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\" | reason = `Unhealthy` | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range])))",
"legendFormat": "",
"queryType": "range",
"refId": "A"
}
],
"title": "Unhealthy",
"transformations": [
{
"id": "extractFields",
"options": {
"format": "json",
"keepTime": false,
"replace": false
}
}
],
"type": "stat"
},
{
"datasource": {
"type": "loki",
"uid": "${DS_KUBE-LOKI}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 1
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 3,
"x": 18,
"y": 10
},
"id": 10,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "10.0.2",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${DS_KUBE-LOKI}"
},
"editorMode": "builder",
"expr": "sum(count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\" | reason = `FailedMount` | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range])))",
"queryType": "range",
"refId": "A"
}
],
"title": "FailedMount",
"type": "stat"
},
{
"datasource": {
"type": "loki",
"uid": "${DS_KUBE-LOKI}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 1
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 3,
"x": 21,
"y": 10
},
"id": 9,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "10.0.2",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${DS_KUBE-LOKI}"
},
"editorMode": "builder",
"expr": "sum(count by(name) (rate({logs_type=\"kube-events\"} | json namespace=\"namespace\", reason=\"reason\", name=\"name\", event_type=\"event_type\", component=\"component\", count=\"count\" | reason = `FailedScheduling` | event_type =~ `$event_type` | namespace =~ `$namespace` | component =~ `$component` [$__range])))",
"queryType": "range",
"refId": "A"
}
],
"title": "FailedScheduling",
"transformations": [
{
"id": "extractFields",
"options": {
"format": "json",
"source": "Line"
}
}
],
"type": "stat"
},
{
"datasource": {
"type": "loki",
"uid": "${DS_KUBE-LOKI}"
},
"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": "reason"
},
"properties": [
{
"id": "custom.width",
"value": 102
}
]
},
{
"matcher": {
"id": "byName",
"options": "source"
},
"properties": [
{
"id": "custom.width",
"value": 159
}
]
},
{
"matcher": {
"id": "byName",
"options": "count"
},
"properties": [
{
"id": "custom.width",
"value": 69
}
]
},
{
"matcher": {
"id": "byName",
"options": "type"
},
"properties": [
{
"id": "custom.width",
"value": 85
}
]
},
{
"matcher": {
"id": "byName",
"options": "Time"
},
"properties": [
{
"id": "custom.width",
"value": 195
}
]
},
{
"matcher": {
"id": "byName",
"options": "message"
},
"properties": [
{
"id": "custom.width",
"value": 778
}
]
},
{
"matcher": {
"id": "byName",
"options": "namespace"
},
"properties": [
{
"id": "custom.width",
"value": 98
}
]
},
{
"matcher": {
"id": "byName",
"options": "name"
},
"properties": [
{
"id": "custom.width",
"value": 444
}
]
},
{
"matcher": {
"id": "byName",
"options": "kind"
},
"properties": [
{
"id": "custom.width",
"value": 53
}
]
},
{
"matcher": {
"id": "byName",
"options": "event_type"
},
"properties": [
{
"id": "custom.width",
"value": 87
}
]
},
{
"matcher": {
"id": "byName",
"options": "component"
},
"properties": [
{
"id": "custom.width",
"value": 121
}
]
}
]
},
"gridPos": {
"h": 11,
"w": 24,
"x": 0,
"y": 15
},
"id": 8,
"options": {
"cellHeight": "sm",
"footer": {
"countRows": false,
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true,
"sortBy": [
{
"desc": true,
"displayName": "Time"
}
]
},
"pluginVersion": "10.0.2",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${DS_KUBE-LOKI}"
},
"editorMode": "builder",
"expr": "{logs_type=\"kube-events\"} | json namespace=\"namespace\", event_type=\"event_type\", component=\"component\" | namespace =~ `$namespace` | event_type =~ `$event_type` | component =~ `$component`",
"hide": false,
"key": "Q-5137c8e8-5364-4573-9c8d-372c9468d7a2-0",
"maxLines": 1000,
"queryType": "range",
"refId": "A"
}
],
"title": "List",
"transformations": [
{
"id": "extractFields",
"options": {
"format": "json",
"source": "Line"
}
},
{
"id": "organize",
"options": {
"excludeByName": {
"Line": true,
"action": true,
"clusterName": true,
"eventTime": true,
"firstTimestamp": true,
"id": true,
"involvedObject": true,
"labels": true,
"lastTimestamp": true,
"metadata": true,
"reportingComponent": true,
"reportingInstance": true,
"source": true,
"tsNs": true
},
"indexByName": {
"Line": 6,
"Time": 1,
"component": 5,
"event_type": 10,
"id": 8,
"kind": 3,
"labels": 0,
"message": 11,
"name": 4,
"namespace": 2,
"reason": 9,
"tsNs": 7
},
"renameByName": {}
}
}
],
"type": "table"
}
],
"refresh": "",
"schemaVersion": 38,
"style": "dark",
"tags": [
"kubernetes"
],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "Kube-loki",
"value": "Kube-loki"
},
"hide": 0,
"includeAll": false,
"label": "Logs source",
"multi": false,
"name": "logs_source",
"options": [],
"query": "loki",
"queryValue": "",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
},
{
"current": {
"selected": false,
"text": "Kube-prometheus",
"value": "Kube-prometheus"
},
"hide": 0,
"includeAll": false,
"label": "Metrics source",
"multi": false,
"name": "metrics_source",
"options": [],
"query": "prometheus",
"queryValue": "",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
},
{
"current": {},
"datasource": {
"type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}"
},
"definition": "label_values(kube_namespace_labels,exported_namespace)",
"hide": 0,
"includeAll": true,
"label": "Namespace",
"multi": false,
"name": "namespace",
"options": [],
"query": {
"query": "label_values(kube_namespace_labels,exported_namespace)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"current": {
"selected": true,
"text": "Warning",
"value": "Warning"
},
"hide": 0,
"includeAll": true,
"label": "Event type",
"multi": false,
"name": "event_type",
"options": [
{
"selected": false,
"text": "All",
"value": "$__all"
},
{
"selected": true,
"text": "Warning",
"value": "Warning"
},
{
"selected": false,
"text": "Normal",
"value": "Normal"
}
],
"query": "Warning, Normal",
"queryValue": "",
"skipUrlSync": false,
"type": "custom"
},
{
"current": {},
"datasource": {
"type": "prometheus",
"uid": "${DS_KUBE-PROMETHEUS}"
},
"definition": "label_values(kube_pod_labels{exported_namespace=\"$namespace\"},label_app_kubernetes_io_component)",
"hide": 0,
"includeAll": true,
"label": "Component",
"multi": false,
"name": "component",
"options": [],
"query": {
"query": "label_values(kube_pod_labels{exported_namespace=\"$namespace\"},label_app_kubernetes_io_component)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
}
]
},
"time": {
"from": "now-1h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Kubernetes events",
"uid": "bce70149-6173-4ba5-bdd9-9ed60dc0f296",
"version": 45,
"weekStart": ""
}