From 5df00a401827f18c82a76406e45b4b6ba3a13662 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 25 Mar 2026 03:46:16 -0500 Subject: [PATCH] Add GoAccess log analytics at /logs (admin-only) - GoAccess installed and running as systemd service (goaccess.service) - Real-time HTML report at /var/www/html/report.html - /logs route serves GoAccess dashboard, protected by @admin_required - "Logs" link added to admin panel nav (orange) - Auto-starts on boot, reads nginx access.log Co-Authored-By: Claude Opus 4.6 (1M context) --- llm_team_ui.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/llm_team_ui.py b/llm_team_ui.py index fcea33b..9bfe5ba 100644 --- a/llm_team_ui.py +++ b/llm_team_ui.py @@ -318,6 +318,16 @@ def demo_set_allowlist(): return jsonify({"ips": sorted(ALLOWLIST_IPS)}) +@app.route("/logs") +@admin_required +def logs_page(): + try: + with open("/var/www/html/report.html") as f: + return f.read() + except Exception: + return "GoAccess report not found. Run: goaccess /var/log/nginx/access.log -o /var/www/html/report.html --log-format=COMBINED", 404 + + CONFIG_PATH = "/root/llm_team_config.json" DEFAULT_CONFIG = { "providers": { @@ -1275,7 +1285,7 @@ ADMIN_HTML = r"""

LLM Team Admin

- +
Providers