# you can disable an alarm notification by setting the 'to' line to: silent

      alarm: system_post_update_reboot_status
         on: system.post_update_reboot_status
      class: Errors
       type: System
  component: OS
host labels: _os=linux
       calc: $required
      units: status
      every: 10s
       warn: $this == 1
    summary: System requires reboot after package updates
       info: System requires reboot after package updates
         to: sysadmin


# Detects system reboots by monitoring uptime
# - Uses 2-hour history (15 min offset) to identify real reboots vs new systems
# - Alerts when uptime is under 10 minutes
# Note: Will not work on nodes with DB mode RAM as they have no history after reboot

      alarm: system_reboot_detection
         on: system.uptime
      class: Errors
       type: System
  component: OS
     lookup: max -2h at -15m unaligned
       calc: ($this != nan AND $uptime < 60 * 10) ? 1 : 0
      units: status
      every: 1m
       warn: $this == 1
    summary: System has rebooted within the last 10 minutes
       info: System has rebooted within the last 10 minutes
         to: silent
