Add three dynamic infrastructure auto-suppression mechanisms to net_alerter
- Option A: OUI-based auto-exclusion for network equipment (Ubiquiti, Cisco, Aruba, TP-Link, Netgear, MikroTik, Ruckus) - Option B: Churn-based suppression (cycles 3+ times in 30min auto-suppresses device) - Option C: Verify NET_ALERTER_INFRA_IPS env var is documented and functional Implementation: - Added NETWORK_EQUIPMENT_OUIS set with 45 common network equipment OUI prefixes - Added _check_churn() function to track departure events within 30min window - Integrated OUI check into on_arrival() and seed_infrastructure_ips() - Integrated churn check into on_departure() before timer start - Enhanced seed_infrastructure_ips() docstring to document all 5 seeding steps - Removed interactive BB_ALERTER_INFRA_IPS prompt from operator_setup.sh (post-deploy config only)
This commit is contained in:
@@ -405,9 +405,6 @@ if [[ "$enable_alerter" =~ ^[yY]$ ]]; then
|
||||
BB_ALERTER_WEBHOOK="$ntfy_url"
|
||||
fi
|
||||
|
||||
# Infrastructure IPs to exclude from alerts (access points, switches, etc.)
|
||||
prompt_default alerter_infra_ips "Infrastructure IPs to exclude (comma-separated, optional)" ""
|
||||
BB_ALERTER_INFRA_IPS="$alerter_infra_ips"
|
||||
fi
|
||||
|
||||
# BLE Presence Detection
|
||||
@@ -714,9 +711,6 @@ if [[ -n "$BB_ALERTER_MATRIX_HS" ]]; then
|
||||
echo "BB_ALERTER_MATRIX_ROOM=\"${BB_ALERTER_MATRIX_ROOM}\"" >> "${MOUNT_POINT}/root/bb-config.env"
|
||||
echo "BB_ALERTER_MATRIX_TOKEN=\"${BB_ALERTER_MATRIX_TOKEN}\"" >> "${MOUNT_POINT}/root/bb-config.env"
|
||||
fi
|
||||
if [[ -n "$BB_ALERTER_INFRA_IPS" ]]; then
|
||||
echo "BB_ALERTER_INFRA_IPS=\"${BB_ALERTER_INFRA_IPS}\"" >> "${MOUNT_POINT}/root/bb-config.env"
|
||||
fi
|
||||
|
||||
# Store Tailscale auth key if needed
|
||||
if [[ "$BB_VPN" == "tailscale" && -n "$TAILSCALE_KEY" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user