Watchdog: Troubleshooting
Common Watchdog problems with symptom, check and solution: login, missing checks or emails, agent offline, Docker socket, paths, SSL, DNS and the queue.
Watchdog: Troubleshooting
Show the logs of all containers with make stage-logs or make live-logs. On live, in production mode, the app writes only errors (and deprecations) as JSON to stderr.
Login
Login always fails
- Check: Does the env file still contain
APP_ADMIN_PASSWORD_HASH=not-setor an empty value? Did Docker Compose alter the hash? - Solution: Set a real bcrypt hash. In
.env.stageand.env.liveevery$must be doubled to$$, in.env.localput the hash in single quotes. Then restart the containers so they re-read the env file.
Checks do not run
A dashboard check stays PENDING
- Check: Are the
schedulerandworkercontainers running? Are client and check active? IsDashboard (Network)selected as runner? - Solution: Start the missing containers (
docker compose -f compose.live.yml up -d scheduler worker). Activate client and check. In development mode (local, stage) the scheduler writes the lineDispatch due checks tickwithevaluatedanddispatchedto the log filevar/log/dev.logevery minute. In the local stack it also appears in the container output because the scheduler runs with-vvthere.
An agent check stays PENDING
- Check: Is the agent
Onlineunder Agents? Is the check's runnerAgent (Local)with an agent assigned? Is the client active? - Solution: See the next section. Run now triggers a run that the agent picks up on its next tick.
The agent shows Offline or Never seen
- Check: The agent container's logs. Typical messages are
Dashboard URL is required,Agent token is requiredandAgent token rejected by dashboard (401). - Solution: Set
WATCHDOG_DASHBOARD_URLandWATCHDOG_AGENT_TOKEN. Replace a rejected token via Regenerate Token. An agent without a token exits immediately and Docker keeps restarting it. Make sure the agent can reach the dashboard URL (firewall, HTTPS).
Agent check results are missing after a dashboard outage
- Check: Did the agent fail to load the check list five times in a row?
- Solution: In that case the agent empties its list and runs checks again only after the next successful fetch (at the latest after the 5-minute configuration interval). No action is needed.
Emails
No alert emails arrive
- Check: Does the client have at least one contact under Alert contacts? Is the
workercontainer running? AreMAILER_DSNandMAILER_FROMcorrect? Was there a status change at all (see Notifications)? - Solution: Assign contacts and start the worker. On stage and locally you see the emails in Mailpit.
php bin/console messenger:failed:showin the app container lists failed deliveries.
No recovery email after an outage
- Check: Did the check return
UNKNOWNbetweenFAILandOK, for example because of missing configuration or an unreachable Docker socket? - Solution: Fix the cause of the
UNKNOWN. A recovery email exists only for the direct change fromWARNorFAILtoOK.
Individual check types
Docker check: Docker socket not available at /var/run/docker.sock
- Check: Is the socket mounted in the container that runs the check?
- Solution: Mount
/var/run/docker.sock:/var/run/docker.sock:ro. For the agent the line is commented out in the Compose files.
Docker check: Docker API error: Cannot connect to Docker socket: Permission denied
- Check: Does the container run as a user without access to the socket's group?
- Solution: Add
group_addwith the socket's group ID (stat -c %g /var/run/docker.sockon the host), as worker and scheduler do.
Disk, file or log check: Path not found or File not found
- Check: Is
/:/host/root:romounted andHOST_ROOT=/host/rootset? Does the path exist on the host? - Solution: Set the volume and the variable. The
docker-compose.agent.ymltemplate does not containHOST_ROOT.
Process check always reports FAIL
- Check: Does the agent service have
pid: host? - Solution: Add the line and restart the agent.
SSL check reports Connection to <host>:443 failed
- Check: Is the host reachable, is the port right and does the chain come from a publicly trusted CA? Certificates from a private CA fail verification.
- Solution: Set the port in the check settings. For private CAs the form offers the
Allow self-signedoption, which cannot be saved in the UI though (see SSL Certificate).
DNS check with a custom resolver: exit 127
- Check: Is
diginstalled in the container? - Solution: Install
dig(packagebind-toolson Alpine) in the image or use the system resolver by leavingCustom resolverempty.
HTTP check: URL is rejected on save
- Check: Does the URL have a host name with a dot (top-level domain)?
- Solution: The form does not accept
http://localhostor single-label host names. Use a full name or an IP address.
Custom check does not appear in the selection
- Check: Does the class carry
#[AutoconfigureTag('watchdog.check')]and implementCheckInterface? Is the image rebuilt? - Solution: See Writing Custom Checks.
Operations
429 Too many requests for agents
- Check: Do several agents report from the same IP address (NAT, proxy)?
- Solution: The limit is 60 requests per minute and IP. Each agent needs about two to four requests per minute. Make sure
TRUSTED_PROXIESis set correctly behind a proxy so that the real IP counts.
Old results disappear
- Check: Does the check have a value under Keep results for (days)?
- Solution: The scheduler deletes older results daily at 03:00. Clear the field if you want to keep all results.
Database file not writable
- Check: Is
/app/var/data.dbin the volume owned bywww-data? - Solution:
make stage-updatesets the permissions during an update. Alternatively inside the container:docker compose -f compose.stage.yml exec --user root app chown www-data:www-data /app/var/data.db.