Admin Logs & Monitoring – Guide
How to use the built‑in logs and jobs views to monitor system health.
Roles: Access to these views is gated. Failed Requests is available to root, system_admin, customer_care. Jobs is available to root and system_admin.
1) Opening Logs
- Open Admin and click Logs (🧾) in the top bar.
- Use the Type dropdown to switch between Failed Payments, Failed Requests, and Jobs.
- Use the search box to filter and the Prev/Next buttons to paginate.
2) Failed Payments
- Source:
wave_payments table (entries where payment_status != 'success').
- Columns: Ref, Phone, Amount, Payment Status, Checkout Status, Timestamp.
- Filter: Search by phone number or Wave ref id.
- Use it for: Investigating failed or pending Wave checkouts and correlating with user reports.
3) Failed Requests
- Source:
failed_requests table. Populated by the backend when certain portal actions fail.
- Columns: ID, Phone, MAC, AP, Reason, Timestamp.
- Filter: Filter by phone or device MAC using the search box (UI sends the appropriate parameters).
- Use it for: Tracking portal failures like session start issues or AP lookup problems.
4) Jobs
- Source:
job_runs table.
- Columns: ID, Job Name, Status (
success|failed|running), Started, Finished, Duration, Message.
- Instrumented Jobs:
scan_aps, mobile_sync_profiles.
- Use it for: Verifying scheduled jobs execute as expected and inspecting last run results.
5) API Endpoints
GET /api/admin/logs/failed-payments?limit=&offset=&q=&since=&until=
GET /api/admin/logs/failed-requests?limit=&offset=&phone=&mac=
GET /api/admin/logs/jobs?limit=&offset=&job_name=&since=&until=
6) Notes
- Logs are paginated server‑side. Increase limit temporarily if needed (max 200).
- Database indexes are in place for fast queries on these views.
- Backend logs are structured JSON and include a request correlation id for tracing.
7) Troubleshooting
- Unauthorized: Your session may have expired, or your account lacks the required role.
- No results: Adjust filters and date ranges. Recent data may need a page refresh.
- Background jobs missing: Ensure your scheduler triggers job scripts and the app database is reachable.
8) Health Endpoints
GET /healthz: liveness. Returns 200 with {status:'ok', uptime_sec, version?}.
GET /readyz: readiness. Checks DB connectivity and returns 200 or 503.
© INET Wi‑Fi Portal