Difference between revisions of "Watchdog"

From wiki.netio-products.com
Jump to navigation Jump to search
Line 1: Line 1:
 
[[File:Watchdog_diagram_user.png|thumb|Watchdog diagram]]
 
[[File:Watchdog_diagram_user.png|thumb|Watchdog diagram]]
  
Watchdog is a tool that allows you to ping a given (IP) address using the ping command. In this way, you can eg. monitor the availability of a device connected to the output or connectivity to the Internet.
+
Watchdog is a function periodically pinging to one defined IP address or URL. It's periodically checking reply from defined IP device by ping (ICMP). You can monitor physical presence of the IP device or Internet connectivity. You can use several WatchDog functions in parallel.
 +
 
 +
Based on each Watchdog state one or several RULEs can be executed. Each one Rule can perform several actions (Set Output, Short Off (restart) output, Toggle output or send Alarm state to the NETIO Cloud service. Based on this Alarm state can NETIO Cloud send email to defined recipient. All Watchdogs are listed in the JSON protocol wit their current states. It can be used by 3rd party software.
 +
 
 +
Each Watchdog function state is the <code>FAIL</code> variable.  
 +
* Watchdog Fail = '''FALSE'''</code> = ping answer is '''OK'''
 +
* Watchdog Fail = <code>'''TRUE'''</code> = ping answer '''not received'''
  
In case of failure, it is possible to invoke a follow-up rule-based action (see Rules). Output of Watchdog is the variable <code>FAIL</code>. It shows value <code>TRUE</code> when evaluation ends with a failure or <code>FALSE</code> when pinging is successful.
 
  
 
== Structure ==
 
== Structure ==

Revision as of 17:07, 16 November 2021

Watchdog diagram

Watchdog is a function periodically pinging to one defined IP address or URL. It's periodically checking reply from defined IP device by ping (ICMP). You can monitor physical presence of the IP device or Internet connectivity. You can use several WatchDog functions in parallel.

Based on each Watchdog state one or several RULEs can be executed. Each one Rule can perform several actions (Set Output, Short Off (restart) output, Toggle output or send Alarm state to the NETIO Cloud service. Based on this Alarm state can NETIO Cloud send email to defined recipient. All Watchdogs are listed in the JSON protocol wit their current states. It can be used by 3rd party software.

Each Watchdog function state is the FAIL variable.

  • Watchdog Fail = FALSE = ping answer is OK
  • Watchdog Fail = TRUE = ping answer not received


Structure

Variable Value Description
target IP / URL Monitored address
pingInterval int [s] Time interval between pings
timeout int [s] Time waiting for answer
maxTimeouts int Number of failed pings required to evaluate to FAIL=TRUE
timeToReboot int [s] Time the Watchdog waits after announcing an error condition before starting a new cycle
maxRestarts int Maximum number of restarts when an error condition is declared. After this limit is reached, the Watchdog remains in an FAIL=TRUE state until the next successful ping.

If set to 0, the Watchdog will restart the device after each FAIL=TRUE is declared.