mirror of
https://github.com/nikdoof/helm-charts.git
synced 2025-12-24 07:09:30 +00:00
29 lines
955 B
YAML
29 lines
955 B
YAML
{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }}
|
|
{{- include "common.values.setup" . -}}
|
|
apiVersion: monitoring.coreos.com/v1
|
|
kind: PrometheusRule
|
|
metadata:
|
|
name: {{ include "common.names.fullname" . }}
|
|
labels:
|
|
{{- include "common.labels" . | nindent 4 }}
|
|
{{- with .Values.metrics.prometheusRule.labels }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
groups:
|
|
- name: {{ include "common.names.fullname" . }}
|
|
rules:
|
|
- alert: MQTTExporterAbsent
|
|
annotations:
|
|
description: MQTT Exporter has disappeared from Prometheus service discovery.
|
|
summary: MQTT Exporter is down.
|
|
expr: |
|
|
absent(up{job=~".*{{ include "common.names.fullname" . }}.*"} == 1)
|
|
for: 5m
|
|
labels:
|
|
severity: critical
|
|
{{- with .Values.metrics.prometheusRule.rules }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|