scale-catalog/stable/uptimerobot-prometheus/12.0.7/templates/prometheusrules.yaml

28 lines
950 B
YAML
Raw Normal View History

2024-07-13 07:59:30 +00:00
{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: {{ include "tc.common.names.fullname" . }}
labels:
{{- include "tc.common.labels" . | nindent 4 }}
{{- with .Values.metrics.prometheusRule.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
groups:
- name: {{ include "tc.common.names.fullname" . }}
rules:
- alert: UptimeRobotExporterAbsent
annotations:
description: Uptime Robot Exporter has disappeared from Prometheus service discovery.
summary: Uptime Robot Exporter is down.
expr: |
absent(up{job=~".*{{ include "tc.common.names.fullname" . }}.*"} == 1)
for: 5m
labels:
severity: critical
{{- with .Values.metrics.prometheusRule.rules }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}