NightOwl is a bring-your-own-database product. Your telemetry — every request, query, exception, job attempt, and log line — lives in a PostgreSQL instance you control. That gives you full ownership of retention, backups, and compliance, and it keeps storage costs decoupled from per-seat dashboard pricing.Documentation Index
Fetch the complete documentation index at: https://docs.usenightowl.com/llms.txt
Use this file to discover all available pages before exploring further.
Storage model
Every connected app points at one PostgreSQL database. The agent writes through SQLite’s WAL buffer into ~20nightowl_* tables using COPY for high-volume event tables and INSERT … ON CONFLICT for upsert tables (nightowl_exceptions, nightowl_users).
Because the data lives in your PostgreSQL, you can:
- Connect your own BI tools (Metabase, Grafana, Superset) directly to the
nightowlschema. - Run arbitrary SQL for ad-hoc analysis without hitting an API rate limit.
- Control exactly where the data is geographically stored, for GDPR or data-residency reasons.
- Back it up alongside the rest of your database with tools you already trust.
Retention
Telemetry is high-volume and low-shelf-life. The agent ships with a single global retention window — 14 days by default — applied uniformly to every event table it prunes. Set it in the customer app’s environment:| Tables | Behavior |
|---|---|
nightowl_requests, nightowl_queries, nightowl_exceptions, nightowl_commands, nightowl_jobs, nightowl_cache_events, nightowl_mail, nightowl_notifications, nightowl_outgoing_requests, nightowl_scheduled_tasks, nightowl_logs, nightowl_alerts | Rows older than NIGHTOWL_RETENTION_DAYS are deleted. |
nightowl_issues, nightowl_issue_activity, nightowl_issue_comments | Never auto-pruned. Triage state survives occurrence cleanup. |
nightowl_settings, nightowl_alert_channels, nightowl_users | Configuration and user identity — never auto-pruned. |
Pruning
Thenightowl:prune artisan command deletes rows older than NIGHTOWL_RETENTION_DAYS (or --days=N to override for one run). Schedule it alongside your other Laravel scheduled tasks:
DELETE … WHERE created_at < ? per table. On PostgreSQL, follow up occasionally with VACUUM (ANALYZE) to reclaim disk — the command doesn’t do this automatically because it may compete with production workload.
Manual cleanup and resets
Selective delete (Data Management)
The Data Management page in the sidebar lets you delete telemetry for a specific date range, narrowed by table and filter. Use it to clear out noise from a staging incident, a runaway log level, or a single bad deploy without waiting for retention to catch up.- Pick a From / To date range. The
Todate must be at least 30 days in the past — the endpoint rejects anything newer to prevent accidental deletion of live data. - Select which tables to include. By default all 12 event tables are selected (
nightowl_requests,nightowl_queries,nightowl_exceptions,nightowl_commands,nightowl_jobs,nightowl_cache_events,nightowl_mail,nightowl_notifications,nightowl_outgoing_requests,nightowl_scheduled_tasks,nightowl_logs,nightowl_alerts). - Optionally narrow by route path, status code, duration, user, job status, log level, exception class, or cache event type. Filters only apply to tables where the column exists.
- Preview shows counts per table before you commit. Deletion is then chunked in 10,000-row batches. After the deletion, any
nightowl_issuesrow oftype = 'exception'whose fingerprint no longer has a matching row innightowl_exceptionsis cleaned up automatically; performance issues are not touched by this sweep.
Delete app (Danger Zone)
From Settings → Danger Zone, Delete app removes the app from NightOwl along with its agent token and alert routing. Does not drop or truncate yournightowl_* tables — that’s your database, and we won’t touch it. If you want the telemetry gone too, use Data Management for a targeted range or run php artisan nightowl:clear in the customer app for a full truncate.
Backups
NightOwl doesn’t manage backups — that’s your PostgreSQL provider’s job. Thenightowl_* tables back up the same way the rest of your database does. If you use pg_dump, include the schema you configured (public by default) and you’ll capture everything. If you use managed snapshots (RDS, Cloud SQL), they already cover it.
For point-in-time-restore strategies, treat the nightowl_* tables like any other high-write workload — their WAL volume scales with telemetry throughput, so budget your WAL storage accordingly.
Sizing expectations
As a rough baseline for capacity planning:| Workload | Daily rows | Daily storage (compressed) |
|---|---|---|
| Small app (~100 req/s) | ~8.6M | ~500 MB |
| Medium app (~1,000 req/s) | ~86M | ~5 GB |
| Large app (~10,000 req/s) | ~860M | ~50 GB |