centerclick / feedback

Issues, Bug Reports, and Feature Requests
7 stars 0 forks source link

Better logging/communication #95

Open tlhackque opened 1 year ago

tlhackque commented 1 year ago

When things go wrong, the NTP2xx should be able to e-mail its administrator for help and/or log to a syslog server.

This includes certificate renewal issues, out-of-memory events, automatic software updates, configuration changes, and other significant events.

As a dedicated "set and forget" appliance, it should not be necessary for a human to poll for status; it needs to be manageable, which includes generating alerts when attention is needed.

Along these lines, recent debugging of https certificate renewals highlighted the fact that the existing console log for these does not include timestamps. Timestamps are extremely valuable for debugging and for correlating with other systems' logs...

Writing to a syslog server (udp/514) is quite simple - see syslog(3) for the libc functions. All that's needed for a UI is a hostname/ip address. syslogd(8) is required; it can also keep a local log if you elect to make the log visible to console users. Distribution (to the local log(s0, external servers) is handled by syslogd with no extra effort by the log writers. (If you're using busybox, syslogd is a configurable option.)

Sending e-mail can be more involved if authentication is involved, though devices as simple as UPSs have that option. (Given the complexity of OATH tokens now in favor, syslog is probably the simplest option.; the syslog server or a consumer can always send e-mail.)

SNMP is another option, but requires more setup effort for everyone; you'd need to sign out an OID prefix and generate a MIB; users would need software that can make sense of it.

I think that adopting syslog is the easiest first step that provides the most benefit and flexibility for the effort...