feat: add NTP monitor type for network time protocol monitoring#7214
feat: add NTP monitor type for network time protocol monitoring#7214henricook wants to merge 4 commits intolouislam:masterfrom
Conversation
|
Hello and thanks for lending a paw to Uptime Kuma! 🐻👋 |
fdfbb66 to
91bc4bf
Compare
Adds a new monitor type that queries NTP servers via UDP, parses the response per RFC 5905, and checks stratum, time offset, and root dispersion against configurable thresholds. Includes knex migration, full backend test suite, and frontend UI in the Specific Monitor Type category. Resolves louislam#5028
91bc4bf to
2f7ae74
Compare
|
Ready for review! My first contribution, please be gentle 🙏🏻 |
|
I think there are 2 real issues here:
Could we add |
… up general socket management
|
Thanks for your time and thoughtful comments @smarshall-rightside . I've added a DNS lookup to gauge ipv4 Vs. ipv6 - there's no precedent for this in the code base but that's because I think I'm dealing with UDP here and not many of the existing monitors have had to think about that. I'd love to know what you think. Other changes are just tidying up my use of |
…a into feature/ntp-monitor
|
Nice addition overall @henricook, thanks for taking the feedback on board. I checked the latest changes and I think the DNS lookup + socket selection is the right call here for UDP/NTP, and the socket lifecycle cleanup looks much safer/cleaner too. Nice addition overall. I'd certainly use it. |
Resolves #5028, builds on the great work by @Jas0n99 on their fork
Summary
In this pull request, the following changes are made:
Adds a new monitor type that queries NTP servers via UDP
Parses the response per RFC 5905
Checks stratum, time offset, and root dispersion against configurable thresholds.
Resolves NTP check #5028
Checklist
I understand that I am responsible for and able to explain every line of code I submit.
Screenshots for Visual Changes
UP