Community discussions

MikroTik App
 
Medis
just joined
Topic Author
Posts: 3
Joined: Tue Feb 28, 2023 10:16 pm

reboot - ping down

Sun Dec 17, 2023 2:19 pm

hi, I would like to create an automatic reboot system if the 8.8.8.8 ping goes down after 5 minutes. Anyone help me?
With netwatch e script??? :?:
 
holvoetn
Forum Guru
Forum Guru
Posts: 5500
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: reboot - ping down

Sun Dec 17, 2023 2:22 pm

Watchdog
 
Medis
just joined
Topic Author
Posts: 3
Joined: Tue Feb 28, 2023 10:16 pm

Re: reboot - ping down

Sun Dec 17, 2023 2:27 pm

but it doesn't reboot
Last edited by Medis on Sun Dec 17, 2023 3:21 pm, edited 1 time in total.
 
holvoetn
Forum Guru
Forum Guru
Posts: 5500
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: reboot - ping down

Sun Dec 17, 2023 3:58 pm

Then your setting it up wrong because that's what it is supposed to do.

https://help.mikrotik.com/docs/display/ROS/Watchdog

Use ping watchdog.
 
Medis
just joined
Topic Author
Posts: 3
Joined: Tue Feb 28, 2023 10:16 pm

Re: reboot - ping down

Sun Dec 17, 2023 4:27 pm

but it reboot infinitely.
I would only like it once
 
holvoetn
Forum Guru
Forum Guru
Posts: 5500
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: reboot - ping down

Sun Dec 17, 2023 6:04 pm

You said it should reboot when 8.8.8.8 is unavailable ?
That's what watchdog does then.

And otherwise you need to be a bit more clear on exactly what you are trying to achieve.
 
eldoncito2019
Member
Member
Posts: 333
Joined: Fri Jun 14, 2019 1:07 pm

Re: reboot - ping down

Sun Dec 17, 2023 6:17 pm

Use this:
:if ([/ping 8.8.8.8 count=6] = 0) do={/system reboot [find]}
I hope it helps you.
 
Medis
just joined
Topic Author
Posts: 3
Joined: Tue Feb 28, 2023 10:16 pm

Re: reboot - ping down

Sun Dec 17, 2023 8:12 pm

Use this:
:if ([/ping 8.8.8.8 count=6] = 0) do={/system reboot [find]}
I hope it helps you.
In the Netwatch?
 
User avatar
diamuxin
Member
Member
Posts: 319
Joined: Thu Sep 09, 2021 5:46 pm
Location: Alhambra's City

Re: reboot - ping down

Sun Dec 17, 2023 8:39 pm

In the Netwatch?

# Netwatch (Host tab)
Host: 8.8.8.8
Type: simple
Interval: 00:05:00 
Timeout: 1.00

# Netwatch (Test tab)
:local HOST $host
:local HostStatus [/tool netwatch get value-name=status [find host=$HOST]]
:if ($HostStatus="down") do={/system reboot}

Who is online

Users browsing this forum: No registered users and 13 guests