From c26294b0a5ac7e6317817b115341de129fc9643f Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Sun, 19 Jan 2020 18:57:38 +0100 Subject: [PATCH] Warn when orphans packages are present --- roles/prometheus/templates/prometheus/alert.rules.yml.j2 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/roles/prometheus/templates/prometheus/alert.rules.yml.j2 b/roles/prometheus/templates/prometheus/alert.rules.yml.j2 index 1a58fd38..b3722096 100644 --- a/roles/prometheus/templates/prometheus/alert.rules.yml.j2 +++ b/roles/prometheus/templates/prometheus/alert.rules.yml.j2 @@ -150,6 +150,14 @@ groups: annotations: summary: "{{ $value }} paquet(s) APT sont inutile(s) sur {{ $labels.instance }}." + - alert: AptOrphans + expr: apt_orphans > 0 + for: 5m + labels: + severity: warning + annotations: + summary: "{{ $value }} paquet(s) APT sont orphelin(s) sur {{ $labels.instance }}." + # NTP (need NTP plugin in node) # - alert: ntp_drifting # expr: node_ntp_drift_seconds > 0.05