you could use that ruleset to set the 30/60 second offset and just leave the stratum settings at the default value of 10. If the stratum of your time source you’re synchronizing with is that high i think it should trigger a WARN/CRIT state, as you probably shouldn’t synchronize it.
I also think that the System Time service for Windows hosts works a bit differently than for Linux hosts. On Windows it checks the time difference between the windows host and your monitoring server (at least that’s how it was with the “old” Windows agent). That is based on the assumption that your monitoring server has the correct time and is set as the reference value for the time on your Windows hosts. This behaviour might have been changed with the new Windows agent, so someone please correct me if I’m wrong on this.
On Linux it checks the output of the ntpq-command, so it really checks the time synchronisation of your monitored host and its NTP server.
You need to extend you Linux Agent. The last output should be a section with name
<<<systemtime>>>
1616796507
and timestamp of the agent call.
Now your Linux host should also show an time offset like on Windows. It should be the last section generated that you have no extra time from other sections generated.
Hi @gera83,
you can use this local check to convert the unix systemtime to windows systemtime output.
Checkmk then uses the systemtime checks made for windows for your linux systems. And you can use the rules made for windows.
Put this script in the localcheck directory e.g /usr/lib/check_mk_agent/local/
time.sh
#!/bin/bash
# unix sytemtime format to windows timeformat converter
if type date> /dev/null 2>&1 ;then
echo "<<<systemtime>>>"
date '+%s'
fi
Hope this helps you and use this script at your own risk.
Greetings Norm
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.