Exercice 26
https://awesome-prometheus-alerts.grep.to/rules.html
Créer le fichier /opt/prometheus/config/rules/basic.rules.yml et ajouter :
groups:
- name: example
rules:
- alert: (PXX) Instance down
expr: count(up == 0) >= 1
for: 1m
labels:
severity: page
annotations:
summary: (PXX) Instance down
description: >
(PXX) Instance down {{ range query "up == 0" }}
- {{ .Labels.instance }} - {{ .Labels.job }}
{{ end }}