Add alertmanager rules
@@ -111,11 +111,40 @@ spec:
selector:
app: kuberhealthy
---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ labels:
+ app: "prometheus"
+ # prometheus:
+ role: alert-rules
+ name: kuberhealthy
+data:
+ kuberhealthy.rules: |-
+ groups:
+ - name: ./kuberhealthy.rules
+ rules:
+ - alert: KuberhealthyError
+ expr: kuberhealthy_running < 1
+ for: 5m
+ labels:
+ severity: critical
+ annotations:
+ description: Kuberhealthy is not healthy
+ - alert: ClusterUnhealthy
+ expr: kuberhealthy_cluster_state < 1
+ for: 5m
+ labels:
+ severity: critical
+ annotations:
+ description: Kuberhealthy shows that the cluster is not healthy
+---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
component: kuberhealthy
+ # prometheus: ""
name: kuberhealthy
spec:
jobLabel: component
