itamae/cookbooks/prometheus/files/etc/prometheus.d/alerts/filestat.yml

21 lines
605 B
YAML

groups:
- name: filestat
rules:
- alert: RebootRequired
expr: file_glob_match_number{pattern="/var/run/reboot-required"} > 0
for: 24h
labels:
severity: warning
annotations:
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."