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:
zhi
2026-03-20 10:03:56 +00:00
parent d67f676006
commit 14dcda3cdc
4 changed files with 18 additions and 0 deletions

View File

@@ -304,6 +304,8 @@ def get_server_states_view(db: Session, offline_after_minutes: int = 7):
'disk_pct': st.disk_pct if st else None,
'swap_pct': st.swap_pct if st else None,
'agents': json.loads(st.agents_json) if st and st.agents_json else [],
'nginx_installed': st.nginx_installed if st else None,
'nginx_sites': json.loads(st.nginx_sites_json) if st and st.nginx_sites_json else [],
'last_seen_at': last_seen.isoformat() if last_seen else None,
})
return out