No validation or warning when DNSWATCHER_TARGETS is empty #69

Closed
opened 2026-03-02 00:50:46 +01:00 by clawbot · 0 comments
Collaborator

Problem

When DNSWATCHER_TARGETS is empty (the default), dnswatcher starts successfully and runs indefinitely — but monitors nothing. It logs:

"msg":"watcher starting","domains":0,"hostnames":0

...and then sits idle, burning CPU cycles on empty ticker loops.

This is a common misconfiguration scenario (forgetting to set the env var, typo in the variable name, etc.) and the daemon gives no indication that it is doing nothing useful.

Expected Behavior

At minimum, log a WARN-level message clearly stating that no targets are configured and the daemon will not monitor anything. Ideally, exit with a non-zero status and a clear error message — a monitoring daemon with nothing to monitor is a misconfiguration.

Category

Should-fix before 1.0. Fail-fast on bad config is a quality-of-life issue that prevents silent deployment failures.

## Problem When `DNSWATCHER_TARGETS` is empty (the default), dnswatcher starts successfully and runs indefinitely — but monitors nothing. It logs: ``` "msg":"watcher starting","domains":0,"hostnames":0 ``` ...and then sits idle, burning CPU cycles on empty ticker loops. This is a common misconfiguration scenario (forgetting to set the env var, typo in the variable name, etc.) and the daemon gives no indication that it is doing nothing useful. ## Expected Behavior At minimum, log a WARN-level message clearly stating that no targets are configured and the daemon will not monitor anything. Ideally, exit with a non-zero status and a clear error message — a monitoring daemon with nothing to monitor is a misconfiguration. ## Category Should-fix before 1.0. Fail-fast on bad config is a quality-of-life issue that prevents silent deployment failures.
clawbot added the bot label 2026-03-02 00:50:46 +01:00
clawbot self-assigned this 2026-03-02 00:56:39 +01:00
clawbot removed their assignment 2026-03-02 01:23:00 +01:00
sneak closed this issue 2026-03-02 01:26:58 +01:00
clawbot removed the bot label 2026-03-02 01:30:29 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/dnswatcher#69