Need Script

Hello folks,

Don’t ask me why :slight_smile: , but I need a script that will act like watchdog.
So script should reboot Mikrotik each time the connection to certain IP address is lost.

But I have to ask why :wink:
Doesn’t the netwatch utility do what you want to do? It’s meant for just such purposes…

Cheers cmit :slight_smile:

Well, I have installed mikrotik on mini-itx motherboard and Compact Flash drive and problem is when I do manual reboot it does reboot, but any other system reboot is hanging.
So, during installation, when it comes to reboot part, I was forced to unplug power cord to actually reboot.
When watchdog should reboot (but hangs the system), again power cord helped?!
Only winbox or terminal /system reboot is working without probs?!
I don’t know why?!
This is why I said not to ask me why :slight_smile:

So, I think it is obvious why I need script, cause I guess it will actually call terminal command and reboot.

God help me with this :smiley:

Hm, come on guys, I am sure you can do this…

Set watch-address in / system watchdog to the IP and it will reboot the IP is unreachable.

what if system is not responsive?

http://www.mikrotik.com/docs/ros/2.8/appex/scripting1

See about a quarter of the way down the page “A Ping based Netwatch”. Just change email code to /system reboot.

Hope that helps.

Then it wont work with a script or anything software, now will it?
If a system is not responding you need a hardware watchdog.

More precise link would be:
http://www.mikrotik.com/docs/ros/2.8/appex/scripting1||0.1859428017450315

Like one found on RouterBOARDs

sten, I told ya, it is hanging the system. I am using watchdog on other routers, but here it wont work…

Thx GJS and Eugene, this is exactly what I need :wink:

It’s working, if i shutdown link, system is finally rebooting :slight_smile:

Cheers Folks…