Explorar o código

Move promtheus rules to template

Raghunandana S K %!s(int64=4) %!d(string=hai) anos
pai
achega
8dcd139b53
Modificáronse 1 ficheiros con 11 adicións e 2 borrados
  1. 11 2
      tools/kubernetes/helm/hue/templates/prometheus-rule-hue.yaml

+ 11 - 2
tools/kubernetes/helm/hue/templates/prometheus-rule-hue.yaml

@@ -3,10 +3,19 @@ apiVersion: monitoring.coreos.com/v1
 kind: PrometheusRule
 metadata:
   labels:
-    prometheus: example
+    prometheus: hue
     role: alert-rules
   name: hue
 spec:
   groups:
-{{ toYaml .Values.alerting.prometheusRules | indent 4}}
+    - name: hue-pod-monitor.alert.rules
+      rules:
+      - alert: hue_pods_are_down
+        expr: count(up{job="hue"})==0 #Update the rule according to alerting requirements
+        for: 30m #Change this based on your SLA
+        labels:
+          severity: High
+        annotations:
+          summary: Hue pods are down
+          impact: Users might not be able to query via Hue Web UI
 {{ end }}