System health, logs and audit (admin)
The admin System section — settings/plugin switches, health checks, logs, and the audit log + rules. Where to look when something's wrong on the platform.
# System health, logs and audit (admin)
Platform-admin only, at **admin.contexta.uk**, under the **System** menu.
- **Settings** — system info + the `PlatformPlugins` master switches. Toggling a
plugin off disables its routes platform-wide (the kill switch).
- **Health checks** — live DB + queue checks plus presence of required keys/config.
First stop when "is the platform up?" — confirms the container can reach SQL, the
job queue, and has its secrets.
- **Logs** — the in-memory log handler's recent entries, filterable. Quick triage
without SSHing the VM.
- **Audit log** — every audited action across companies (newest first); click a row
for the full event + entity history + the user's recent activity.
- **Audit rules** — the `AuditEventTypes` catalog of what's audited.
## When something's wrong
1. **Health checks first** — DB/queue/keys green? If DB is red, the container can't
reach SQL (check the connection string / firewall).
2. **/health on the app host** — `https://app.contexta.uk/health` returns the live
`git_hash`, build, and `database` status. Confirms what's actually deployed.
3. **Logs** — for an in-flight error, the in-memory log filter is faster than SSH.
4. **Deploy verification** — after a deploy, `infrastructure/scripts/post-deploy-verify.ps1`
runs the prod smoke probe + cert check and fails if anything's off.
Deeper run/queue diagnostics live in the Studio queue page and the per-run logs, not
the admin cockpit.
Tags: admin, system, health, logs, audit, audit log, settings, plugins, troubleshooting, monitoring, diagnostics