Difference between revisions of "Netwatch Script Reboots MikroTik"

From Idrive
Jump to navigation Jump to search
(Created page with "'''Mikrotik Netwatch script on AP for auto reboot ...''' http://forum.mikrotik.com/viewtopic.php?t=56138 First - what this does: * It will ping test an IP address. This can...")
 
Line 21: Line 21:
  
 
# Click the Apply button - then click the OK button
 
# Click the Apply button - then click the OK button
 +
 +
  
 
'''At this time - we have a script - it is not running or active yet.'''
 
'''At this time - we have a script - it is not running or active yet.'''

Revision as of 15:26, 6 February 2017

Mikrotik Netwatch script on AP for auto reboot ...

http://forum.mikrotik.com/viewtopic.php?t=56138

First - what this does:

  • It will ping test an IP address. This can be a remote IP address
  • If the remote IP address does not answer any pings for about 5 minutes, then the router reboots.


To set it up - follow these steps using Winbox:

  1. Go to System-->Scripts

Click on the red "+" Give your script a Name (in my example I will use "NetWatchBoot-192.168.0.10"

  1. In the Source: area paste in the entire line below:
if ([/ping 192.168.0.10 interval=5 count=60] =0) do={

log info "my ping watchdog is down" ; /system reboot }

  1. Click the Apply button - then click the OK button


At this time - we have a script - it is not running or active yet.

  1. Go to Tools-->Netwatch

Click on the red "+" On the Host tab - type in 192.168.0.10

Set interval for 30 min

  1. Click on the Down tab

Paste in the line below: /system script run NetWatchBoot-192.168.0.10

  1. Click the Apply button - then click the OK button