feat(monitor): store nginx telemetry for generic clients
- accept nginx installation status and sites-enabled list - persist nginx fields in server state - expose nginx data in monitor overview/admin views - auto-migrate new server_states columns on startup
This commit is contained in:
@@ -224,6 +224,12 @@ def _migrate_schema():
|
||||
if _has_table(db, "server_states") and not _has_column(db, "server_states", "plugin_version"):
|
||||
db.execute(text("ALTER TABLE server_states ADD COLUMN plugin_version VARCHAR(64) NULL"))
|
||||
|
||||
# --- server_states nginx telemetry for generic monitor client ---
|
||||
if _has_table(db, "server_states") and not _has_column(db, "server_states", "nginx_installed"):
|
||||
db.execute(text("ALTER TABLE server_states ADD COLUMN nginx_installed BOOLEAN NULL"))
|
||||
if _has_table(db, "server_states") and not _has_column(db, "server_states", "nginx_sites_json"):
|
||||
db.execute(text("ALTER TABLE server_states ADD COLUMN nginx_sites_json TEXT NULL"))
|
||||
|
||||
db.commit()
|
||||
except Exception as e:
|
||||
db.rollback()
|
||||
|
||||
Reference in New Issue
Block a user