Manual:System/Watchdog: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
mNo edit summary
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Versions|v3, v4 +}}
{{Versions|v3, v4 +}}
__TOC__


<div class=manual>
<div class=manual>
Line 5: Line 7:
==Summary==
==Summary==
<p>
<p>
This menu allows to configure system to reboot on kernel panic, when an IP address does not respond, or in case the system has locked up. Software watchdog timer is used to provide the last option, so in very rare cases (caused by hardware malfunction) it can lock up by itself. There is a hardware watchdog device available in RouterBOARD hardware, which can reboot the system in any case.
This menu allows to configure system to reboot, when a specific IP address does not respond, or when it detects, that the software has locked up. The detection is done in two ways:
*Software watchdog timer (mostly caused by hardware malfunction) device can recover itself with a reboot.
*Ping watchdog can monitor connectivity to a specific IP address and trigger reboot function.
</p>
</p>
{{Note | These are two different Watchdog features and both have their own settings. By default software Watchdog is enabled and ping Watchdog is disabled. You can enable ping Watchdog by specifying an IP address and you can disable software Watchdog by unsetting Watchdog Timer option. }}


==Properties==
==Properties==
Line 16: Line 21:
   <th width="40%">Property</th>
   <th width="40%">Property</th>
   <th >Description</th>
   <th >Description</th>
</tr>
<tr>
    <td><var><b>reboot-on-failure</b></var> (<em>yes | no</em>; Default: <b></b>)</td>
    <td>Whether to reboot on kernel panic</td>
</tr>
</tr>
<tr>
<tr>
     <td><var><b>watch-address</b></var> (<em>IP</em>; Default: <b>none</b>)</td>
     <td><var><b>watch-address</b></var> (<em>IP</em>; Default: <b>none</b>)</td>
     <td>The system will reboot in case 6 sequental pings to the given IP address (sent once per 10 seconds) will fail. If set to <b>none</b> this feature is disabled.</td>
     <td>The system will reboot, in case 6 sequential pings to the given IP address will fail. If set to <b>none</b> this feature is disabled. By default router will reboot every 6 minutes if watch-address is set and not reachable.</td>
</tr>
</tr>
<tr>
<tr>
Line 31: Line 32:
<tr>
<tr>
     <td><var><b>no-ping-delay</b></var> (<em>time</em>; Default: <b>5m</b>)</td>
     <td><var><b>no-ping-delay</b></var> (<em>time</em>; Default: <b>5m</b>)</td>
     <td>Specifies how long after reboot not to test and ping watch-address. The default setting means that if watch-address is set and is not reachable, the router will reboot about every 6 minutes.</td>
     <td>Specifies how long will it wait before trying to reach the watch-address. </td>
</tr>
<tr>
    <td><var><b>ping-timeout</b></var> (<em>time</em>; Default: <b>60s</b>)</td>
    <td>Specifies the time interval in which the device will be pinged 6 times (after "no-ping-delay").</td>
</tr>
</tr>
<tr>
<tr>
     <td><var><b>automatic-supout</b></var> (<em>yes | no</em>; Default: <b>yes</b>)</td>
     <td><var><b>automatic-supout</b></var> (<em>yes | no</em>; Default: <b>yes</b>)</td>
     <td>When software failure happens, a file named "autosupout.rif" is generated automatically. The previous "autosupout.rif" file is renamed to "autosupout.old.rif"</td>
     <td>When software failure happens, a file named "autosupout.rif" is generated automatically, when software failure occurs. The previous "autosupout.rif" file is renamed to "autosupout.old.rif. It contains the same information as a regular supout.rif file.
</td>
</tr>
</tr>
<tr>
<tr>
Line 54: Line 60:
</tr>
</tr>
</table>
</table>


==Basic examples==
==Basic examples==
Line 63: Line 68:
\... send-to-email=support@example.com send-smtp-server=192.0.2.1
\... send-to-email=support@example.com send-smtp-server=192.0.2.1
[admin@MikroTik] system watchdog> print
[admin@MikroTik] system watchdog> print
  reboot-on-failure: yes
       watch-address: none
       watch-address: none
     watchdog-timer: yes
     watchdog-timer: yes

Latest revision as of 09:12, 6 August 2021

Version.png

Applies to RouterOS: v3, v4 +

Summary

This menu allows to configure system to reboot, when a specific IP address does not respond, or when it detects, that the software has locked up. The detection is done in two ways:

  • Software watchdog timer (mostly caused by hardware malfunction) device can recover itself with a reboot.
  • Ping watchdog can monitor connectivity to a specific IP address and trigger reboot function.

Icon-note.png

Note: These are two different Watchdog features and both have their own settings. By default software Watchdog is enabled and ping Watchdog is disabled. You can enable ping Watchdog by specifying an IP address and you can disable software Watchdog by unsetting Watchdog Timer option.


Properties

Sub-menu: /system watchdog


Property Description
watch-address (IP; Default: none) The system will reboot, in case 6 sequential pings to the given IP address will fail. If set to none this feature is disabled. By default router will reboot every 6 minutes if watch-address is set and not reachable.
watchdog-timer (yes | no; Default: yes) Whether to reboot if system is unresponsive for a minute
no-ping-delay (time; Default: 5m) Specifies how long will it wait before trying to reach the watch-address.
ping-timeout (time; Default: 60s) Specifies the time interval in which the device will be pinged 6 times (after "no-ping-delay").
automatic-supout (yes | no; Default: yes) When software failure happens, a file named "autosupout.rif" is generated automatically, when software failure occurs. The previous "autosupout.rif" file is renamed to "autosupout.old.rif. It contains the same information as a regular supout.rif file.
auto-send-supout (yes | no; Default: no) After the support output file is automatically generated, it can be sent by email
send-email-from (string; Default: ) e-mail address to send the support output file from. If not set, the value set in /tool e-mail is used
send-email-to (string; Default: ) e-mail address to send the support output file to.
send-smtp-server (string; Default: ) SMTP server address to send the support output file through. If not set, the value set in /tool e-mail is used.

Basic examples

To make system generate a support output file and sent it automatically to support@example.com throught the 192.0.2.1in case of a software crash:

[admin@MikroTik] system watchdog> set auto-send-supout=yes \
\... send-to-email=support@example.com send-smtp-server=192.0.2.1
[admin@MikroTik] system watchdog> print
      watch-address: none
     watchdog-timer: yes
      no-ping-delay: 5m
   automatic-supout: yes
   auto-send-supout: yes
   send-smtp-server: 192.0.2.1
      send-email-to: support@example.com
[admin@MikroTik] system watchdog>

[ Top | Back to Content ]