feat(openclaw): add PrometheusRule for pod readiness, crashlooping, and PVC storage

This commit is contained in:
Moritz Graf
2026-10-06 20:35:47 +02:00
parent 0f606e3ddf
commit 744f8e243b
+36
View File
@@ -0,0 +1,36 @@
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: openclaw-alerts
namespace: openclaw
labels:
release: prometheus-operator
app.kubernetes.io/name: openclaw
spec:
groups:
- name: openclaw.rules
rules:
- alert: OpenClawPodNotReady
expr: kube_pod_status_ready{namespace="openclaw", pod="openclaw-0", condition="true"} == 0
for: 5m
labels:
severity: critical
annotations:
summary: "OpenClaw pod openclaw-0 is not ready"
description: "Pod openclaw-0 in namespace openclaw has been unready for more than 5 minutes. Telegram and background agents may be offline."
- alert: OpenClawCrashLooping
expr: increase(kube_pod_container_status_restarts_total{namespace="openclaw", pod="openclaw-0"}[15m]) >= 2
for: 2m
labels:
severity: warning
annotations:
summary: "OpenClaw container restart detected"
description: "Container {{ $labels.container }} in pod openclaw-0 has restarted {{ $value }} times in the last 15 minutes."
- alert: OpenClawDataVolumeLow
expr: kubelet_volume_stats_available_bytes{namespace="openclaw", persistentvolumeclaim="openclaw-data"} / kubelet_volume_stats_capacity_bytes{namespace="openclaw", persistentvolumeclaim="openclaw-data"} < 0.15
for: 15m
labels:
severity: warning
annotations:
summary: "OpenClaw PVC data volume is low on space"
description: "PersistentVolumeClaim openclaw-data has less than 15% space available."