#!/bin/bash # ============================================================================================== # ============================== AI Log Pattern Check ======================================= # ============================================================================================== # PURPOSE # ───────────────────────────────────────────────────────────────────────────── # Checks the repair sweep's syslog triage two ways, because the two failure modes are opposite # and a single test catches only one of them: # # RECALL — every line in ai_log_fixtures.txt is recognised, with the right subject and # the right level. Faults this host has never had, which is most of them. # PRECISION — replays this machine's entire real syslog history and reports everything the # patterns fire on. A pattern that matches normal operation fills the findings # store with noise and teaches the operator to ignore the notification. # # Run it after touching VV_AI_SYSLOG_PATTERNS. Nothing here writes: no findings are filed, no # conf is read for anything but the enable flag, and the sweep is never invoked. # ============================================================================================== # RUNTIME MODES # ============================================================================================== # # ai_log_check.sh both checks # ai_log_check.sh --precision replay the host's syslogs only, and list what matched # ai_log_check.sh --recall fixtures only # # ============================================================================================== SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" php "$SCRIPT_DIR/ai_log_check.php" "$@"