1. Add the parallel settings before you install
Add these to.env before composer require nightowl/agent. The package takes over Nightwatch’s collector as soon as it’s installed, and until NIGHTOWL_PARALLEL_WITH_NIGHTWATCH=true is set it runs standalone, where Nightwatch’s own copy is no longer sent.
NIGHTWATCH_TOKEN is used by the Nightwatch collector to authenticate
outbound telemetry. NIGHTOWL_TOKEN is the token from the NightOwl dashboard.
The NightOwl agent uses it for payload authentication and health reporting.
NIGHTOWL_APP_ID is the connected-app ID shown alongside the token. The
agent embeds it in alert payloads so issue links resolve to this app.boot(), reach both agents too.
If you cache configuration, run php artisan config:cache after changing .env, and restart your queue workers and Octane (or reload PHP-FPM) so every process picks up the new values. With a cached config, .env changes have no effect until you do.
2. Run both agents
NIGHTOWL_AGENT_PORT=2410, restart it: the agent reads its port only when it starts.
Both agents receive the same telemetry. If one goes down, the other keeps running.
Where each copy is sent
Each copy has its own address setting, and NightOwl reads only its own:
NightOwl never reads
NIGHTWATCH_INGEST_URI. If your Nightwatch agent runs in another container or on another host and you point the app at it with NIGHTWATCH_INGEST_URI, set NIGHTOWL_INGEST_URI to the NightOwl agent’s address as well. Otherwise NightOwl’s copy goes to 127.0.0.1 on the app’s own machine, where nothing listens, and is dropped. The same applies after you switch: in standalone mode Nightwatch’s ingest address is ignored entirely. See Dedicated monitoring server for running the NightOwl agent on another host.
Switching fully to NightOwl
Keep the NightOwl agent where it is, on port 2410, and change only the app:- Set
NIGHTOWL_PARALLEL_WITH_NIGHTWATCH=false(or remove the line). LeaveNIGHTOWL_AGENT_PORT=2410as it is. - Let the app pick up the change:
php artisan config:cacheif you cache configuration, then restart your queue workers and Octane, or reload PHP-FPM. - Stop
nightwatch:agentand remove it from your supervisor.
NIGHTOWL_AGENT_PORT for both the agent and the app and restarting the agent, and anything your app sends while no agent listens on the new port is lost. Stop nightwatch:agent first, or the NightOwl agent can’t bind 2407.