Is there a script/functionality to ping domain like netwatch and send email if up/down?

What i need is to ping another remote mikrotik device by using the DDNS address that mikrotik provides. If the remote host goes down then an email is sent. So basically just netwatch but for an url rather than ip address cause the public ip address on the other remote is dynamic and changes from time to time.

I think i found something: http://forum.mikrotik.com/t/wan-status-through-email-notification-with-up-time-and-down-time/142371/1

You simply can use netwatch for check and use the send mail function inside netwatch.

Just simply schedule the update of the watched IP from netwatch.

with working email section and netwatch already configured with actual IP,
schedule a script like:

step 1: try to use the resolve function with the DDNS name for obtain the IP

step 2a: if the resolve function fail, disable netwatch
done

or

step 2b1: if resolver resolve the DDNS, and only if IP is different (for prevent memory wearing), assign the IP to netwatch rule
step 2b2: enable netwatch, only if is disabled (for prevent memory wearing)
done

You could have a look at my script Notify on host up and down. It allows update from dns, and a lot more.

Cool, but i don’t understand the disclaimer:

But be warned: Dynamic updates will probably cause issues if the name has more than one record in dns - a high rate of configuration changes (and flash writes) at least.

But if i’m using the mikrotik cloud ddns address will i still see a lot of flash writes?

Think about a domain like “dns.google”, that resolves to two addresses, 8.8.8.8 and 8.8.4.4.

[admin@MikroTik] > :put [ :resolve dns.google ]
8.8.8.8
[admin@MikroTik] > :put [ :resolve dns.google ]
8.8.4.4

These addresses are used in round-robin, so the script would update the netwatch configuration on most runs.

Records from Mikrotik cloud ddns have exactly one address that is updated when required. No issue there.