ci / test (push) Failing after 23s
kube-state-metrics (NodePort 30808) und ServiceAccount prometheus-infra (nur nodes/metrics) im Cluster; Prometheus auf infra liest kubelet/cAdvisor per TLS gegen die k3s-CA. Ziele per file_sd aus kubectl get nodes, cAdvisor auf die nötigen Reihen begrenzt. Dashboard "k3s – Pods" (Vorgabe nex), Alerts K3s* nur mit notify. Playbook monitoring-k3s.yml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
825 lines
18 KiB
JSON
825 lines
18 KiB
JSON
{
|
||
"uid": "k3s-pods",
|
||
"title": "k3s – Pods",
|
||
"tags": [
|
||
"knaster",
|
||
"k3s"
|
||
],
|
||
"timezone": "browser",
|
||
"schemaVersion": 39,
|
||
"version": 1,
|
||
"editable": false,
|
||
"refresh": "30s",
|
||
"time": {
|
||
"from": "now-6h",
|
||
"to": "now"
|
||
},
|
||
"templating": {
|
||
"list": [
|
||
{
|
||
"name": "namespace",
|
||
"label": "Namespace",
|
||
"type": "query",
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"query": {
|
||
"query": "label_values(kube_namespace_status_phase, namespace)",
|
||
"refId": "ns"
|
||
},
|
||
"definition": "label_values(kube_namespace_status_phase, namespace)",
|
||
"refresh": 2,
|
||
"includeAll": true,
|
||
"multi": true,
|
||
"sort": 1,
|
||
"current": {
|
||
"selected": true,
|
||
"text": [
|
||
"nex"
|
||
],
|
||
"value": [
|
||
"nex"
|
||
]
|
||
}
|
||
}
|
||
]
|
||
},
|
||
"annotations": {
|
||
"list": []
|
||
},
|
||
"panels": [
|
||
{
|
||
"id": 1,
|
||
"type": "stat",
|
||
"title": "Pods laufend",
|
||
"description": "",
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"gridPos": {
|
||
"x": 0,
|
||
"y": 0,
|
||
"w": 4,
|
||
"h": 4
|
||
},
|
||
"targets": [
|
||
{
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"refId": "A",
|
||
"expr": "sum(kube_pod_status_phase{namespace=~\"$namespace\", phase=\"Running\"}) or vector(0)",
|
||
"legendFormat": ""
|
||
}
|
||
],
|
||
"fieldConfig": {
|
||
"defaults": {
|
||
"unit": "none",
|
||
"decimals": 0,
|
||
"thresholds": {
|
||
"mode": "absolute",
|
||
"steps": [
|
||
{
|
||
"color": "green",
|
||
"value": null
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"overrides": []
|
||
},
|
||
"options": {
|
||
"reduceOptions": {
|
||
"calcs": [
|
||
"lastNotNull"
|
||
],
|
||
"fields": "",
|
||
"values": false
|
||
},
|
||
"colorMode": "background",
|
||
"graphMode": "none",
|
||
"textMode": "auto"
|
||
}
|
||
},
|
||
{
|
||
"id": 2,
|
||
"type": "stat",
|
||
"title": "Pods nicht bereit",
|
||
"description": "",
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"gridPos": {
|
||
"x": 4,
|
||
"y": 0,
|
||
"w": 4,
|
||
"h": 4
|
||
},
|
||
"targets": [
|
||
{
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"refId": "A",
|
||
"expr": "sum(kube_pod_status_ready{namespace=~\"$namespace\", condition=\"false\"}) or vector(0)",
|
||
"legendFormat": ""
|
||
}
|
||
],
|
||
"fieldConfig": {
|
||
"defaults": {
|
||
"unit": "none",
|
||
"decimals": 0,
|
||
"thresholds": {
|
||
"mode": "absolute",
|
||
"steps": [
|
||
{
|
||
"color": "green",
|
||
"value": null
|
||
},
|
||
{
|
||
"color": "red",
|
||
"value": 1
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"overrides": []
|
||
},
|
||
"options": {
|
||
"reduceOptions": {
|
||
"calcs": [
|
||
"lastNotNull"
|
||
],
|
||
"fields": "",
|
||
"values": false
|
||
},
|
||
"colorMode": "background",
|
||
"graphMode": "none",
|
||
"textMode": "auto"
|
||
}
|
||
},
|
||
{
|
||
"id": 3,
|
||
"type": "stat",
|
||
"title": "Neustarts (24 h)",
|
||
"description": "",
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"gridPos": {
|
||
"x": 8,
|
||
"y": 0,
|
||
"w": 4,
|
||
"h": 4
|
||
},
|
||
"targets": [
|
||
{
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"refId": "A",
|
||
"expr": "round(sum(increase(kube_pod_container_status_restarts_total{namespace=~\"$namespace\"}[24h]))) or vector(0)",
|
||
"legendFormat": ""
|
||
}
|
||
],
|
||
"fieldConfig": {
|
||
"defaults": {
|
||
"unit": "none",
|
||
"decimals": 0,
|
||
"thresholds": {
|
||
"mode": "absolute",
|
||
"steps": [
|
||
{
|
||
"color": "green",
|
||
"value": null
|
||
},
|
||
{
|
||
"color": "red",
|
||
"value": 1
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"overrides": []
|
||
},
|
||
"options": {
|
||
"reduceOptions": {
|
||
"calcs": [
|
||
"lastNotNull"
|
||
],
|
||
"fields": "",
|
||
"values": false
|
||
},
|
||
"colorMode": "background",
|
||
"graphMode": "none",
|
||
"textMode": "auto"
|
||
}
|
||
},
|
||
{
|
||
"id": 4,
|
||
"type": "stat",
|
||
"title": "Speicher (Arbeitssatz)",
|
||
"description": "",
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"gridPos": {
|
||
"x": 12,
|
||
"y": 0,
|
||
"w": 4,
|
||
"h": 4
|
||
},
|
||
"targets": [
|
||
{
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"refId": "A",
|
||
"expr": "sum(container_memory_working_set_bytes{job=\"cadvisor\", namespace=~\"$namespace\"})",
|
||
"legendFormat": ""
|
||
}
|
||
],
|
||
"fieldConfig": {
|
||
"defaults": {
|
||
"unit": "bytes",
|
||
"decimals": null,
|
||
"thresholds": {
|
||
"mode": "absolute",
|
||
"steps": [
|
||
{
|
||
"color": "green",
|
||
"value": null
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"overrides": []
|
||
},
|
||
"options": {
|
||
"reduceOptions": {
|
||
"calcs": [
|
||
"lastNotNull"
|
||
],
|
||
"fields": "",
|
||
"values": false
|
||
},
|
||
"colorMode": "background",
|
||
"graphMode": "none",
|
||
"textMode": "auto"
|
||
}
|
||
},
|
||
{
|
||
"id": 5,
|
||
"type": "stat",
|
||
"title": "CPU (Kerne)",
|
||
"description": "",
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"gridPos": {
|
||
"x": 16,
|
||
"y": 0,
|
||
"w": 4,
|
||
"h": 4
|
||
},
|
||
"targets": [
|
||
{
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"refId": "A",
|
||
"expr": "sum(rate(container_cpu_usage_seconds_total{job=\"cadvisor\", namespace=~\"$namespace\"}[5m]))",
|
||
"legendFormat": ""
|
||
}
|
||
],
|
||
"fieldConfig": {
|
||
"defaults": {
|
||
"unit": "short",
|
||
"decimals": null,
|
||
"thresholds": {
|
||
"mode": "absolute",
|
||
"steps": [
|
||
{
|
||
"color": "green",
|
||
"value": null
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"overrides": []
|
||
},
|
||
"options": {
|
||
"reduceOptions": {
|
||
"calcs": [
|
||
"lastNotNull"
|
||
],
|
||
"fields": "",
|
||
"values": false
|
||
},
|
||
"colorMode": "background",
|
||
"graphMode": "none",
|
||
"textMode": "auto"
|
||
}
|
||
},
|
||
{
|
||
"id": 6,
|
||
"type": "stat",
|
||
"title": "k3s-Knoten bereit",
|
||
"description": "",
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"gridPos": {
|
||
"x": 20,
|
||
"y": 0,
|
||
"w": 4,
|
||
"h": 4
|
||
},
|
||
"targets": [
|
||
{
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"refId": "A",
|
||
"expr": "sum(kube_node_status_condition{condition=\"Ready\", status=\"true\"}) or vector(0)",
|
||
"legendFormat": ""
|
||
}
|
||
],
|
||
"fieldConfig": {
|
||
"defaults": {
|
||
"unit": "none",
|
||
"decimals": 0,
|
||
"thresholds": {
|
||
"mode": "absolute",
|
||
"steps": [
|
||
{
|
||
"color": "red",
|
||
"value": null
|
||
},
|
||
{
|
||
"color": "green",
|
||
"value": 5
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"overrides": []
|
||
},
|
||
"options": {
|
||
"reduceOptions": {
|
||
"calcs": [
|
||
"lastNotNull"
|
||
],
|
||
"fields": "",
|
||
"values": false
|
||
},
|
||
"colorMode": "background",
|
||
"graphMode": "none",
|
||
"textMode": "auto"
|
||
}
|
||
},
|
||
{
|
||
"id": 7,
|
||
"type": "timeseries",
|
||
"title": "Speicher je Pod",
|
||
"description": "Arbeitssatz (container_memory_working_set_bytes), danach richtet sich das OOM-Limit",
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"gridPos": {
|
||
"x": 0,
|
||
"y": 4,
|
||
"w": 12,
|
||
"h": 9
|
||
},
|
||
"targets": [
|
||
{
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"refId": "A",
|
||
"expr": "sum by (pod) (container_memory_working_set_bytes{job=\"cadvisor\", namespace=~\"$namespace\"})",
|
||
"legendFormat": "{{pod}}"
|
||
}
|
||
],
|
||
"fieldConfig": {
|
||
"defaults": {
|
||
"unit": "bytes",
|
||
"custom": {
|
||
"fillOpacity": 10,
|
||
"lineWidth": 1,
|
||
"showPoints": "never"
|
||
}
|
||
},
|
||
"overrides": []
|
||
},
|
||
"options": {
|
||
"legend": {
|
||
"displayMode": "table",
|
||
"placement": "right",
|
||
"calcs": [
|
||
"lastNotNull",
|
||
"max"
|
||
]
|
||
},
|
||
"tooltip": {
|
||
"mode": "multi",
|
||
"sort": "desc"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 8,
|
||
"type": "timeseries",
|
||
"title": "CPU je Pod",
|
||
"description": "Kerne, Mittel über 5 min",
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"gridPos": {
|
||
"x": 12,
|
||
"y": 4,
|
||
"w": 12,
|
||
"h": 9
|
||
},
|
||
"targets": [
|
||
{
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"refId": "A",
|
||
"expr": "sum by (pod) (rate(container_cpu_usage_seconds_total{job=\"cadvisor\", namespace=~\"$namespace\"}[5m]))",
|
||
"legendFormat": "{{pod}}"
|
||
}
|
||
],
|
||
"fieldConfig": {
|
||
"defaults": {
|
||
"unit": "short",
|
||
"custom": {
|
||
"fillOpacity": 10,
|
||
"lineWidth": 1,
|
||
"showPoints": "never"
|
||
}
|
||
},
|
||
"overrides": []
|
||
},
|
||
"options": {
|
||
"legend": {
|
||
"displayMode": "table",
|
||
"placement": "right",
|
||
"calcs": [
|
||
"lastNotNull",
|
||
"max"
|
||
]
|
||
},
|
||
"tooltip": {
|
||
"mode": "multi",
|
||
"sort": "desc"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 9,
|
||
"type": "table",
|
||
"title": "Pods",
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"gridPos": {
|
||
"x": 0,
|
||
"y": 13,
|
||
"w": 24,
|
||
"h": 9
|
||
},
|
||
"targets": [
|
||
{
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"refId": "A",
|
||
"expr": "max by (pod, node) (kube_pod_info{namespace=~\"$namespace\"})",
|
||
"legendFormat": "",
|
||
"format": "table",
|
||
"instant": true
|
||
},
|
||
{
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"refId": "B",
|
||
"expr": "sum by (pod) (kube_pod_container_status_restarts_total{namespace=~\"$namespace\"})",
|
||
"legendFormat": "",
|
||
"format": "table",
|
||
"instant": true
|
||
},
|
||
{
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"refId": "C",
|
||
"expr": "sum by (pod) (container_memory_working_set_bytes{job=\"cadvisor\", namespace=~\"$namespace\"})",
|
||
"legendFormat": "",
|
||
"format": "table",
|
||
"instant": true
|
||
},
|
||
{
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"refId": "D",
|
||
"expr": "sum by (pod) (kube_pod_container_resource_requests{namespace=~\"$namespace\", resource=\"memory\"})",
|
||
"legendFormat": "",
|
||
"format": "table",
|
||
"instant": true
|
||
},
|
||
{
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"refId": "E",
|
||
"expr": "sum by (pod) (kube_pod_container_resource_limits{namespace=~\"$namespace\", resource=\"memory\"})",
|
||
"legendFormat": "",
|
||
"format": "table",
|
||
"instant": true
|
||
}
|
||
],
|
||
"transformations": [
|
||
{
|
||
"id": "merge",
|
||
"options": {}
|
||
},
|
||
{
|
||
"id": "organize",
|
||
"options": {
|
||
"excludeByName": {
|
||
"Time": true,
|
||
"Value #A": true
|
||
},
|
||
"indexByName": {
|
||
"pod": 0,
|
||
"node": 1,
|
||
"Value #B": 2,
|
||
"Value #C": 3,
|
||
"Value #D": 4,
|
||
"Value #E": 5
|
||
},
|
||
"renameByName": {
|
||
"pod": "Pod",
|
||
"node": "Knoten",
|
||
"Value #B": "Neustarts",
|
||
"Value #C": "Speicher",
|
||
"Value #D": "Request",
|
||
"Value #E": "Limit"
|
||
}
|
||
}
|
||
}
|
||
],
|
||
"fieldConfig": {
|
||
"defaults": {},
|
||
"overrides": [
|
||
{
|
||
"matcher": {
|
||
"id": "byRegexp",
|
||
"options": "Speicher|Request|Limit"
|
||
},
|
||
"properties": [
|
||
{
|
||
"id": "unit",
|
||
"value": "bytes"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"matcher": {
|
||
"id": "byName",
|
||
"options": "Neustarts"
|
||
},
|
||
"properties": [
|
||
{
|
||
"id": "custom.cellOptions",
|
||
"value": {
|
||
"type": "color-background"
|
||
}
|
||
},
|
||
{
|
||
"id": "thresholds",
|
||
"value": {
|
||
"mode": "absolute",
|
||
"steps": [
|
||
{
|
||
"color": "transparent",
|
||
"value": null
|
||
},
|
||
{
|
||
"color": "orange",
|
||
"value": 1
|
||
}
|
||
]
|
||
}
|
||
}
|
||
]
|
||
}
|
||
]
|
||
},
|
||
"options": {
|
||
"showHeader": true,
|
||
"sortBy": [
|
||
{
|
||
"displayName": "Speicher",
|
||
"desc": true
|
||
}
|
||
]
|
||
}
|
||
},
|
||
{
|
||
"id": 10,
|
||
"type": "timeseries",
|
||
"title": "Pods je Knoten (alle Namespaces)",
|
||
"description": "",
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"gridPos": {
|
||
"x": 0,
|
||
"y": 22,
|
||
"w": 12,
|
||
"h": 8
|
||
},
|
||
"targets": [
|
||
{
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"refId": "A",
|
||
"expr": "sum by (node) (kube_pod_info)",
|
||
"legendFormat": "{{node}}"
|
||
}
|
||
],
|
||
"fieldConfig": {
|
||
"defaults": {
|
||
"unit": "none",
|
||
"custom": {
|
||
"fillOpacity": 10,
|
||
"lineWidth": 1,
|
||
"showPoints": "never"
|
||
}
|
||
},
|
||
"overrides": []
|
||
},
|
||
"options": {
|
||
"legend": {
|
||
"displayMode": "table",
|
||
"placement": "right",
|
||
"calcs": [
|
||
"lastNotNull",
|
||
"max"
|
||
]
|
||
},
|
||
"tooltip": {
|
||
"mode": "multi",
|
||
"sort": "desc"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 11,
|
||
"type": "timeseries",
|
||
"title": "Speicher der Pods je Knoten (alle Namespaces)",
|
||
"description": "",
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"gridPos": {
|
||
"x": 12,
|
||
"y": 22,
|
||
"w": 12,
|
||
"h": 8
|
||
},
|
||
"targets": [
|
||
{
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"refId": "A",
|
||
"expr": "sum by (instance) (container_memory_working_set_bytes{job=\"cadvisor\"})",
|
||
"legendFormat": "{{instance}}"
|
||
}
|
||
],
|
||
"fieldConfig": {
|
||
"defaults": {
|
||
"unit": "bytes",
|
||
"custom": {
|
||
"fillOpacity": 10,
|
||
"lineWidth": 1,
|
||
"showPoints": "never"
|
||
}
|
||
},
|
||
"overrides": []
|
||
},
|
||
"options": {
|
||
"legend": {
|
||
"displayMode": "table",
|
||
"placement": "right",
|
||
"calcs": [
|
||
"lastNotNull",
|
||
"max"
|
||
]
|
||
},
|
||
"tooltip": {
|
||
"mode": "multi",
|
||
"sort": "desc"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 12,
|
||
"type": "bargauge",
|
||
"title": "Belegung der Volumes (PVC)",
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"gridPos": {
|
||
"x": 0,
|
||
"y": 30,
|
||
"w": 24,
|
||
"h": 6
|
||
},
|
||
"targets": [
|
||
{
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"refId": "A",
|
||
"expr": "max by (persistentvolumeclaim) (kubelet_volume_stats_used_bytes{namespace=~\"$namespace\"} / kubelet_volume_stats_capacity_bytes{namespace=~\"$namespace\"})",
|
||
"legendFormat": "{{persistentvolumeclaim}}"
|
||
}
|
||
],
|
||
"fieldConfig": {
|
||
"defaults": {
|
||
"unit": "percentunit",
|
||
"min": 0,
|
||
"max": 1,
|
||
"thresholds": {
|
||
"mode": "absolute",
|
||
"steps": [
|
||
{
|
||
"color": "green",
|
||
"value": null
|
||
},
|
||
{
|
||
"color": "orange",
|
||
"value": 0.8
|
||
},
|
||
{
|
||
"color": "red",
|
||
"value": 0.9
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"overrides": []
|
||
},
|
||
"options": {
|
||
"orientation": "horizontal",
|
||
"displayMode": "gradient",
|
||
"reduceOptions": {
|
||
"calcs": [
|
||
"lastNotNull"
|
||
],
|
||
"fields": "",
|
||
"values": false
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|