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