No validation or warning when DNSWATCHER_TARGETS is empty #69
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
When
DNSWATCHER_TARGETSis empty (the default), dnswatcher starts successfully and runs indefinitely — but monitors nothing. It logs:...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.