nightowl/agent

NightOwl monitoring agent — collects telemetry from laravel/nightwatch and writes to PostgreSQL

Maintainers

Package info

github.com/lemed99/nightowl-agent

pkg:composer/nightowl/agent

Statistics

Installs: 23

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.2.3 2026-04-30 16:57 UTC

README

NightOwl

NightOwl Agent

Self-hosted Laravel monitoring agent. Drop-in Nightwatch alternative, open-source.

Packagist Version PHP 8.2+ MIT License Tests

NightOwl dashboard demo

What is this?

NightOwl is an open-source Laravel monitoring agent paired with a closed-source hosted dashboard. The agent runs inside your app, buffers telemetry locally, and drains directly into your own PostgreSQL database — your request data never touches our servers. The dashboard at usenightowl.com connects to your database with credentials you control to render the monitoring UI.

Install

composer require nightowl/agent
php artisan nightowl:install

Sign up and create an app to get your agent token: usenightowl.com/signup

Full installation guide: docs.usenightowl.com

Architecture

 Your Laravel app                             Your infrastructure
 ┌──────────────────┐    TCP    ┌──────────────────────────────┐
 │ laravel/         │──2407────▶│ NightOwl Agent (ReactPHP)    │
 │ nightwatch       │           │  ├─ SQLite WAL buffer        │
 └──────────────────┘           │  └─ pcntl drain workers      │
                                │         │                    │
                                │         │ COPY protocol      │
                                │         ▼                    │
                                │   PostgreSQL (yours)         │
                                └──────────────────────────────┘
                                            ▲
                                            │ reads via your creds
                                 ┌──────────┴──────────┐
                                 │ NightOwl Dashboard  │
                                 │ (hosted, closed)    │
                                 └─────────────────────┘

13,400 payloads/s on a single instance — ReactPHP non-blocking TCP ingest, SQLite WAL buffering, PostgreSQL COPY drain with synchronous_commit = off.

Features

  • Requests — durations, status codes, routes, P95, slow endpoints
  • Jobs — queue latency, attempts, failures, per-queue breakdowns
  • Queries — N+1 detection, slow queries, per-request SQL timelines
  • Exceptions — fingerprinted groups, stack traces, assignees, resolve/ignore
  • Logs — level filtering, context metadata, per-request log streams
  • Users — request and exception counts per authenticated user
  • Alerts — Email (BYO SMTP), Webhook (HMAC), Slack, Discord
  • Host metrics — CPU, memory, load average
  • Agent health — ingest/drain rates, back-pressure, 19 diagnosis rules

Requirements

  • PHP 8.2+ (with pdo_pgsql, pdo_sqlite; pcntl + posix for the async driver)
  • PostgreSQL 14+
  • Laravel 11 or 12
  • Redis — optional, only if your app already uses it for queues/cache

Self-hosting

The agent writes telemetry directly to your PostgreSQL database, never to ours. The only data the agent sends to NightOwl is agent/host health (ingest rates, buffer depth, CPU/memory) — zero request, query, or exception data leaves your infrastructure. The dashboard is hosted but connects to your DB using credentials you provided, which you can rotate or revoke at any time.

Contributing

Contributions are welcome. See CONTRIBUTING.md for setup, test suite structure, and conventions. Bug reports and feature requests go through GitHub Issues.

License

MIT — use it, fork it, ship it.

Related