Watchdog
Watchdog
Section titled “Watchdog”Summary
Section titled “Summary”Sub-menu: /system watchdog
The Watchdog feature provides two independent mechanisms for automatically recovering your router from unresponsive states:
-
Software Watchdog Timer - Monitors system responsiveness and reboots if the operating system becomes unresponsive, typically due to hardware malfunction or software issues
-
Ping Watchdog - Continuously monitors connectivity to a specified IP address and triggers a reboot if the target becomes unreachable, ensuring the router recovers from network connectivity issues
Watchdog reboot is not considered a system failure. It is an automatic reboot triggered by the operating system when a service is not responding as expected. Common causes include damaged hardware, slow software implementation, DDoS attacks, or misconfiguration.
Watchdog reboots do not generate autosupout.rif files unless configured with automatic-supout=yes.
Software Watchdog
Section titled “Software Watchdog”The Software Watchdog Timer monitors overall system responsiveness. If the system becomes unresponsive for approximately one minute, it automatically reboots to recover.
This feature is particularly useful for:
- Recovering from kernel panics or hangs
- Dealing with hardware instability
- Automatic recovery from resource exhaustion
By default, Software Watchdog is enabled and requires no configuration:
[admin@MikroTik] /system watchdog> print watchdog-timer: yesTo disable the Software Watchdog:
[admin@MikroTik] /system watchdog> set watchdog-timer=noPing Watchdog
Section titled “Ping Watchdog”The Ping Watchdog monitors network connectivity by periodically sending ICMP pings to a configured address. If six consecutive pings fail, the router automatically reboots.
How Ping Watchdog Works
Section titled “How Ping Watchdog Works”- Router waits for the
ping-start-after-bootperiod (default: 5 minutes) - Sends ping to
watch-address - If ping fails, retries up to 6 times over
ping-timeoutperiod (default: 60 seconds) - If all 6 pings fail, router reboots
- Cycle repeats indefinitely
This creates a 6-minute reboot cycle when the watch-address is unreachable, ensuring the router eventually recovers once connectivity is restored.
Enable Ping Watchdog
Section titled “Enable Ping Watchdog”Configure Ping Watchdog by setting a reachable IP address:
[admin@MikroTik] /system watchdog> set watch-address=8.8.8.8Verify the configuration:
[admin@MikroTik] /system watchdog> print watch-address: 8.8.8.8 watchdog-timer: yes ping-start-after-boot: 5m ping-timeout: 60s automatic-supout: yes auto-send-supout: noRecommended Watch Addresses
Section titled “Recommended Watch Addresses”Choose a reliable, always-reachable IP address:
| Address | Description |
|---|---|
8.8.8.8 | Google’s public DNS |
1.1.1.1 | Cloudflare’s public DNS |
| Your ISP’s gateway | Local gateway router |
| A server on your network | Internal monitoring target |
Avoid using the router’s own IP or IPs in the same subnet, as this may not detect actual internet connectivity loss.
Configuration Properties
Section titled “Configuration Properties”Sub-menu level: /system watchdog
| Property | Type | Default | Description |
|---|---|---|---|
| watchdog-timer | yes | no | yes | Enable software watchdog that reboots if system is unresponsive for ~1 minute |
| watch-address | IP | IP address to ping. Reboots router if 6 consecutive pings fail. Leave unset to disable Ping Watchdog | |
| ping-start-after-boot | time | 5m | Time to wait before Ping Watchdog starts checking watch-address after boot |
| ping-timeout | time | 60s | Time window for sending 6 ping probes during each check cycle |
| automatic-supout | yes | no | yes | Automatically generate autosupout.rif support file before reboot on software failure |
| auto-send-supout | yes | no | no | Email the generated support output file automatically after creation |
| send-email-from | string | Sender email address for support file emails. Uses /tool e-mail settings if unset | |
| send-email-to | string | Recipient email address for support output files | |
| send-smtp-server | string | SMTP server address for sending emails. Uses /tool e-mail settings if unset |
Supout File Configuration
Section titled “Supout File Configuration”When automatic-supout=yes, a support output file is generated before watchdog-triggered reboots. This file helps MikroTik support diagnose the cause of the failure.
Email Configuration Example
Section titled “Email Configuration Example”Configure automatic email notifications with support files:
[admin@MikroTik] /system watchdog> set auto-send-supout=yes \ send-smtp-server=192.0.2.1Verify the complete configuration:
[admin@MikroTik] /system watchdog> print watch-address: none watchdog-timer: yes ping-start-after-boot: 5m automatic-supout: yes auto-send-supout: yes send-smtp-server: 192.0.2.1Email Settings Requirements
Section titled “Email Settings Requirements”Ensure /tool e-mail is configured with proper SMTP credentials:
[admin@MikroTik] /tool e-mail> print address: 192.0.2.1 port: 25 from: [email protected] username: smtp_user password: smtp_passwordMonitoring and Troubleshooting
Section titled “Monitoring and Troubleshooting”Check Watchdog Status
Section titled “Check Watchdog Status”View current watchdog settings and status:
[admin@MikroTik] /system watchdog> printView Watchdog Logs
Section titled “View Watchdog Logs”Watchdog events are logged to the system log with the watchdog topic:
[admin@MikroTik] /log> print where topics~"watchdog"Common Issues
Section titled “Common Issues”Router reboots too frequently
- Verify
watch-addressis reachable from your network - Consider using a closer, more reliable target
- Increase
ping-start-after-bootto reduce reboot frequency
No support file generated
- Ensure
automatic-supout=yesis set - Check available disk space
- Verify
/filedirectory is accessible
Email not sent
- Validate SMTP server settings in
/tool e-mail - Confirm
send-smtp-server,send-email-to, andsend-email-fromare configured - Test email functionality with
/tool e-mail send
Advanced Configuration
Section titled “Advanced Configuration”Disable Software Watchdog Only
Section titled “Disable Software Watchdog Only”Keep Ping Watchdog enabled while disabling Software Watchdog:
[admin@MikroTik] /system watchdog> set watchdog-timer=no watch-address=8.8.8.8Custom Ping Timing
Section titled “Custom Ping Timing”Adjust timing for networks with higher latency:
[admin@MikroTik] /system watchdog> set ping-start-after-boot=10m ping-timeout=120sMonitor Both Watchdogs
Section titled “Monitor Both Watchdogs”Enable both watchdogs for comprehensive protection:
[admin@MikroTik] /system watchdog> set watchdog-timer=yes watch-address=1.1.1.1Related Information
Section titled “Related Information”- System Reboot:
/system reboot- Manual router reboot - Support Output:
/system support output- Generate support files manually - Email Tool:
/tool e-mail- Configure email settings - Netwatch:
/tool netwatch- Alternative monitoring with custom scripts - Health Monitoring:
/system health- Monitor voltage and temperature