Triage could see what Varaverk wrote about itself and what the arrs said about themselves, and nothing else — so a disk throwing I/O errors, a filesystem going read-only or a PCIe link retraining every two minutes was invisible to the thing whose job is noticing. Container state was already watched; no line any container actually wrote ever was. Container patterns match the environment rather than the application. Fifty containers are fifty programs with no shared vocabulary for malfunctioning, but an exact shared one for a full disk or a corrupt SQLite file, because those strings come from libc and SQLite rather than from the app. Both halves are checked by Tools/ai_log_check.sh, which is two tests because the failure modes are opposite: fixtures for recall on faults this host has never had, and a replay of its real logs for precision — 74,519 syslog lines and 79,193 container lines, matching only the PCIe errors it genuinely has. Severity was being graded from a hand-picked three fields, so every one of these would have been filed as a warning however bad it was, and notified as one.
29 lines
1.9 KiB
Bash
Executable File
29 lines
1.9 KiB
Bash
Executable File
#!/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" "$@"
|