From c6531b06a0d7e69d43a18b346a30098ba15a7233 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sat, 24 Oct 2020 13:06:54 +0900 Subject: [PATCH] Monitor `apt-mirror` update status. --- .../prometheus/files/etc/prometheus.d/alerts/filestat.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cookbooks/prometheus/files/etc/prometheus.d/alerts/filestat.yml b/cookbooks/prometheus/files/etc/prometheus.d/alerts/filestat.yml index 5579b21..24abde0 100644 --- a/cookbooks/prometheus/files/etc/prometheus.d/alerts/filestat.yml +++ b/cookbooks/prometheus/files/etc/prometheus.d/alerts/filestat.yml @@ -10,3 +10,11 @@ groups: summary: "Instance {{ $labels.instance }} requires rebooting." description: "{{ $labels.instance }} requires rebooting." + - alert: apt-mirror + expr: time() - file_stat_modif_time_seconds{path="/var/spool/apt-mirror/updated"} > 87000 + for: 12h + labels: + severity: error + annotations: + summary: "apt-mirror is not updated." + description: "apt-mirror is not updated."