1e1fb98afb
Checks the file's mtime on each poll cycle (already running every 30s) rather than adding a separate file-watcher or admin UI. Proxmox hosts already needed no config (auto-discovered every poll); this covers the two lists that did. A parse failure logs and keeps the previous config running instead of crashing the poller. Closes #14. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1.1 KiB
1.1 KiB
Editing monitored hosts without a redeploy
config/hosts.yaml's sshHosts and knownDevices lists are re-read on the next poll
cycle (checks the file's mtime, reloads if changed) — no container restart needed.
- Proxmox-monitored hosts (the node + every LXC) need no config at all — they're auto-discovered from the Proxmox API on every poll already.
- SSH-monitored hosts (
sshHosts): editconfig/hosts.yamlon the deploy host directly (/opt/homelab-monitor/config/hosts.yamlon CT122), save, wait up to one poll interval (POLL_INTERVAL_SECONDS, default 30s). Adding a new SSH host still needs a one-time manual step first — installing the forced-command key on the target (seedocs/ssh-collector-key-setup.md) — that part can't be automated away, so a web form wouldn't make this fully self-service regardless of hot-reload. knownDevices(device discovery labeling): same file, same reload path, no manual step needed since it's just a label list.
If the file fails to parse (bad YAML), the error is logged and the previous in-memory config keeps running rather than crashing the poller.