rancher-charts/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules/kubernetes-absent.yaml.patch

48 lines
2.0 KiB
Diff

--- charts-original/templates/prometheus/rules/kubernetes-absent.yaml
+++ charts/templates/prometheus/rules/kubernetes-absent.yaml
@@ -67,12 +67,12 @@
{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }}
{{- end }}
{{- end }}
-{{- if .Values.kubeControllerManager.enabled }}
+{{- if (include "exporter.kubeControllerManager.enabled" .)}}
- alert: KubeControllerManagerDown
annotations:
message: KubeControllerManager has disappeared from Prometheus target discovery.
runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubecontrollermanagerdown
- expr: absent(up{job="kube-controller-manager"} == 1)
+ expr: absent(up{job="{{ include "exporter.kubeControllerManager.jobName" . }}"} == 1)
for: 15m
labels:
severity: critical
@@ -80,12 +80,12 @@
{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }}
{{- end }}
{{- end }}
-{{- if .Values.kubeScheduler.enabled }}
+{{- if (include "exporter.kubeScheduler.enabled" .)}}
- alert: KubeSchedulerDown
annotations:
message: KubeScheduler has disappeared from Prometheus target discovery.
runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeschedulerdown
- expr: absent(up{job="kube-scheduler"} == 1)
+ expr: absent(up{job="{{ include "exporter.kubeScheduler.jobName" . }}"} == 1)
for: 15m
labels:
severity: critical
@@ -106,12 +106,12 @@
{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }}
{{- end }}
{{- end }}
-{{- if .Values.prometheusOperator.kubeletService.enabled }}
+{{- if (include "exporter.kubeletService.enabled" .) }}
- alert: KubeletDown
annotations:
message: Kubelet has disappeared from Prometheus target discovery.
runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeletdown
- expr: absent(up{job="kubelet"} == 1)
+ expr: absent(up{job="{{ include "exporter.kubelet.jobName" . }}"} == 1)
for: 15m
labels:
severity: critical