watchdog alternative

If for some reason you need SUBJ, try this one:

:if ( [ :pick $pingfail ] = [ :nothing ] ) do={
	:global pingfail 0
}
:if ( [ :pick $pingfail ] = 5 ) do={
	:log warning "Cannot ping address ROUTER_IP, rebooting..."
	/system reboot
} else={
	:if ( [ /ping ROUTER_IP count=3 ] = 0 ) do={
		:set pingfail ( [ :pick $pingfail ] + 1 )
	} else={
		:set pingfail 0
	}
}

Don’t forget to change ROUTER_IP, for example, to your gateway’s IP address…

Denis.