Add System/network_watchdog.sh — services-layer connectivity watchdog
Checks: 1. Internet reachability (gates all remaining checks) 2. DDNS sync — public IP vs Cloudflare DNS record, restarts Gmer4Lfe.com container on mismatch 3. Tailscale status — notify only, no auto-restart 4. NPM proxy — external curl to https://gmer4lfe.com, 2-strike system before NginxProxyManager restart Config: master.conf NETWORK_WATCHDOG_* block, host1.conf HOST1_NETWORK_WATCHDOG_* values Added to SYSTEM_WATCHDOG_SCRIPTS — called by system_watchdog.sh each cycle Fix: storage_watchdog.sh was calling get_strikes/set_strikes without defining them — added local definitions (same pattern as docker_watchdog.sh and stability_watchdog.sh)
This commit is contained in:
@@ -346,6 +346,12 @@
|
||||
["7dtd"]="20480" # 20GB — game server world data, expected to be large
|
||||
)
|
||||
|
||||
# ━━━ Network Watchdog ━━━
|
||||
# Host-specific connectivity config for Watchdogs/System/network_watchdog.sh.
|
||||
HOST1_NETWORK_WATCHDOG_DDNS_DOMAIN="gmer4lfe.com"
|
||||
HOST1_NETWORK_WATCHDOG_DDNS_CONTAINER="Gmer4Lfe.com"
|
||||
HOST1_NETWORK_WATCHDOG_NPM_URL="https://gmer4lfe.com"
|
||||
|
||||
# ━━━ Docker Network Connect ━━━
|
||||
# Containers connected to custom networks at array start by docker_network_connect.sh.
|
||||
# Networks created if they don't exist — idempotent, safe to re-run.
|
||||
|
||||
@@ -308,6 +308,7 @@
|
||||
SYSTEM_WATCHDOG_SCRIPTS=(
|
||||
"Watchdogs/System/storage_watchdog.sh" # pool growth + runaway log detection
|
||||
"Watchdogs/System/webgui_watchdog.sh" # WebGUI availability — nginx → php-fpm → emhttp
|
||||
"Watchdogs/System/network_watchdog.sh" # internet, DDNS, Tailscale, NPM proxy
|
||||
)
|
||||
|
||||
# ━━━ Critical Sync Maintenance ━━━
|
||||
@@ -815,6 +816,17 @@
|
||||
LOG_MIN_SIZE_MB=10 # skip system log if under this size (already small)
|
||||
LOG_DOCKER_MAX_MB=100 # clear Docker container log only if over this size (MB)
|
||||
|
||||
# ━━━ Network Watchdog ━━━
|
||||
# Services-layer connectivity — internet reachability, DDNS sync, Tailscale, NPM proxy.
|
||||
# Host-specific values (domain, container, NPM URL) live in host*.conf.
|
||||
NETWORK_WATCHDOG_ENABLED=true
|
||||
NETWORK_WATCHDOG_INTERNET_URL="https://1.1.1.1"
|
||||
NETWORK_WATCHDOG_INTERNET_TIMEOUT=5
|
||||
NETWORK_WATCHDOG_CHECK_TAILSCALE=true
|
||||
NETWORK_WATCHDOG_NPM_TIMEOUT=10
|
||||
NETWORK_WATCHDOG_NPM_STRIKE_LIMIT=2
|
||||
NETWORK_WATCHDOG_NPM_STATE_FILE="/tmp/network_watchdog_state.db"
|
||||
|
||||
# ━━━ WebGUI Watchdog ━━━
|
||||
# Monitors unRAID WebGUI responsiveness — escalates through nginx restart → emhttp restart.
|
||||
# Separate from docker_watchdog — this monitors the unRAID UI itself, not containers.
|
||||
|
||||
Reference in New Issue
Block a user