Files
helm-charts/charts/hg612-exporter/templates/prometheusrules.yaml
Andrew Williams 47da657ac8 [hg612-exporter] New chart (#29)
* [hg612-export] New chart

* Remove default from identifier

* Correct maintainer

* Fix chart params
2021-12-05 08:34:04 +00:00

28 lines
918 B
YAML

{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }}
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: HG612ExporterAbsent
annotations:
description: HG612 Exporter has disappeared from Prometheus service discovery.
summary: HG612 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 }}