Check MK Agent and NTP on Debian

The configuration of NTP vs timesyncd on Debian 10+ doesn’t work correctly with the 2.0.0 line of check_mk_agent. Verified in versions up to 2.0.0p39

Specifically, check_mk_agent looks for a service named ntp.service to detect the use of NTP for time configuration. In newer versions of Debian, this service is renamed to ntpsec.service.

Changing the line
if [ “$(systemctl | awk ‘/ntp.service|ntpd.service/{print $3; exit}’)” = “active” ]; then
to
if [ “$(systemctl | awk ‘/ntp.service|ntpd.service|ntpsec.service/{print $3; exit}’)” = “active” ]; then

resolves the issue.

2 Likes

Checkmk 2.0.0 is EOL.
This will not be fixed in this version and I am pretty sure, the issue is already fixed in current Checkmk releases.

According to git blame, this has been fixed on October 14, 2021, for version 2.1.0b1.

1 Like