1 # Generated from 'general.rules' group from https://raw.githubusercontent.com/coreos/prometheus-operator/master/contrib/kube-prometheus/manifests/prometheus-rules.yaml
2 {{- if and .Values.defaultRules.create }}
3 apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }}
6 name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "general.rules" | trunc 63 | trimSuffix "-" }}
8 app: {{ template "prometheus-operator.name" . }}
9 {{ include "prometheus-operator.labels" . | indent 4 }}
10 {{- if .Values.defaultRules.labels }}
11 {{ toYaml .Values.defaultRules.labels | indent 4 }}
13 {{- if .Values.defaultRules.annotations }}
15 {{ toYaml .Values.defaultRules.annotations | indent 4 }}
23 message: '{{`{{ $value }}`}}% of the {{`{{ $labels.job }}`}} targets are down.'
24 expr: 100 * (count(up == 0) BY (job) / count(up) BY (job)) > 10
28 - alert: DeadMansSwitch
30 message: This is a DeadMansSwitch meant to ensure that the entire alerting pipeline is functional.