is there a way to compare dates within Mikrotik scripts?
I’m trying to set up SMS alerts using netwatch for devices that are daisy-chained, but I only want an alert for the device that went down/up. I’ve figured out how to prevent the alert when things go down in the chain, just check to see if the previous device in the chain is also down:
:if ([/tool netwatch get [find host=“192.168.xxx.xxx”] status]=“up”) go={/tool e-mail send …}
but when it comes back up, I only want the alert on the device that came back up, not for every device after it in the chain. The only way I can think of doing this is to compare the date in the “since” field, but I’m not exactly sure how to do that. (so if the previous device in the chain has been up for more that say 5 seconds than the device in question an alert is sent)