I'm new to this forum, and also to Miktotik scripting, so please bear with me.
I've taken over an existing rsc script for a 450Gx4 RouterBoard.
I want to add NTP functionality. The RB shall serve both as an NTP Client (to get current time from a "master" device via NTP) and as an NTP server (to provide the current time to multiple other devices). That's why I cannot use the integrated SNTP (it doesn't provide server functionality), but have to use the separate NTP package.
The functionality itself is working, no problem. But, I'm struggling with logging the synchronization events of the NTP client.
When using SNTP I would get a log entry like this in the log file:
Code: Select all
sntp change time Jan/02/1970 00:04:06 => Oct/12/2022 10:52:16
Could someone help me with this? How could I add such log entries using a script, that writes log entries in case there is a successful time synchronization?
Thanks in advance!