feat(monitoring): add automatic restart of unreachable customer containers
Some customers only regain access to their NetBird web UI after a manual container restart, and until now that required someone to notice and do it by hand. The scheduler now optionally probes each customer's actual dashboard URL over HTTP(S) every poll interval (not just Docker container state, since a container can be "running" while the web UI behind it still doesn't respond) and restarts that customer's containers if it doesn't answer, gated by a per-deployment cooldown to avoid restart loops on a persistently broken customer. New system setting "Automatic Restart of Unreachable Containers" (default off) with a configurable cooldown. Every automatic restart is logged in the affected customer's own log, same as a manual restart. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
@@ -133,6 +133,10 @@ def _run_migrations() -> None:
|
||||
("deployments", "netbird_api_token_renewed_at", "TEXT"),
|
||||
("system_config", "netbird_client_auto_update_version", "TEXT DEFAULT 'disabled'"),
|
||||
("system_config", "netbird_client_auto_update_always", "BOOLEAN DEFAULT 0"),
|
||||
# Automatic restart of unreachable customer containers
|
||||
("system_config", "auto_restart_unreachable_enabled", "BOOLEAN DEFAULT 0"),
|
||||
("system_config", "auto_restart_cooldown_minutes", "INTEGER DEFAULT 30"),
|
||||
("deployments", "last_auto_restart_at", "TEXT"),
|
||||
]
|
||||
for table, column, col_type in migrations:
|
||||
if not _has_column(table, column):
|
||||
|
||||
Reference in New Issue
Block a user