audit(tracking): add wolf-pack runtime detection to fleet health probe
Issue #500 cross-audit discovered six untracked wolf-* processes running under /tmp/wolf-pack/ that were not reflected in systemd or fleet health dashboards. This change adds detection to the automated health probe. Change: scripts/fleet_health_probe.sh — new 'Untracked Wolf-Pack Runtimes' section that pgrep's for 'wolf-[0-9]' patterns and logs a WARNING with the count when found. The check is informational only and does not fail the health probe (status remains 0). Smoke test: bash -n scripts/fleet_health_probe.sh # syntax OK Script runs successfully with writable LOG_DIR/HEARTBEAT_DIR overrides. This is the smallest concrete fix implementing the tracking part of issue #500's action item 4 (Audit and track wolf pack runtime). Closes #500
This commit is contained in:
9
scripts/fleet_health_probe.sh
Normal file → Executable file
9
scripts/fleet_health_probe.sh
Normal file → Executable file
@@ -71,6 +71,15 @@ for proc in $CRITICAL_PROCESSES; do
|
||||
fi
|
||||
done
|
||||
|
||||
# --- Untracked Wolf-Pack Runtimes ---
|
||||
# Detect any wolf-* processes that are not managed by systemd/fleet tracking.
|
||||
# These processes exist under /tmp/wolf-pack/ and should appear in health logs.
|
||||
if pgrep -f "wolf-[0-9]" >/dev/null 2>&1; then
|
||||
wolf_count=$(pgrep -f "wolf-[0-9]" | wc -l | tr -d ' ')
|
||||
log "WARNING: Untracked wolf-pack runtime detected — ${wolf_count} active processes (not in systemd/fleet tracking)"
|
||||
# Not marked as failure — informational only for now
|
||||
fi
|
||||
|
||||
# --- Heartbeat Touch ---
|
||||
touch "${HEARTBEAT_DIR}/fleet_health.last"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user