# eventer rules — evaluated by 'pos system event-trigger run' (systemd timer). # Copied to ~/.config/linux_post_install/event.env on install (no clobber). # One independent rule per line. Grammar: # # "" if # (no message → auto-composed) # # The check command is run; its first numeric output is compared against the # threshold (float-safe, unit suffix on the threshold is fine: 60c, 80%, 10g). # Operators: > < >= <= == != # # Rules alert once on false→true (plus one recovery message when the # condition clears) via lib/notify.sh — Telegram by default. # # Examples: # "CPU too hot" if sensors -u coretemp-isa-0000 | awk '/Package id 0:/{f=1} f && /temp1_input:/{print $2; exit}' > 60c # "Disk nearly full" if df -P / | awk 'NR==2{print $5+0}' > 80% # "Load high" if uptime | sed 's/.*load average: //; s/,.*//' >= 4 # # Manage rules interactively: pos system event-trigger config # Schedule the timer: pos system event-trigger enable 5m