mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-08-03 17:54:36 +02:00
netwatch-notify: implemented simple dependency model
This commit is contained in:
parent
e1d9b08b9a
commit
6c14412aa9
2 changed files with 17 additions and 4 deletions
|
@ -8,8 +8,9 @@ Description
|
|||
|
||||
This script sends notifications about host UP and DOWN events. In comparison
|
||||
to just netwatch (`/ tool netwatch`) and its `up-script` and `down-script`
|
||||
this script implements a simple state machine. Host down events are triggered
|
||||
only if the host is down for several checks to avoid false alerts.
|
||||
this script implements a simple state machine and dependency model. Host
|
||||
down events are triggered only if the host is down for several checks and
|
||||
optional parent host is not down to avoid false alerts.
|
||||
|
||||
Requirements and installation
|
||||
-----------------------------
|
||||
|
@ -39,6 +40,14 @@ The count threshould (default is 5 checks) is configurable as well:
|
|||
|
||||
/ tool netwatch add comment="notify, hostname=example.com, count=10" host=104.18.144.11;
|
||||
|
||||
If the host is behind another checked host add a dependency, this will
|
||||
suppress notification if the parent host is down:
|
||||
|
||||
/ tool netwatch add comment="notify, hostname=gateway" host=93.184.216.1;
|
||||
/ tool netwatch add comment="notify, hostname=example.com, parent=gateway" host=93.184.216.34;
|
||||
|
||||
Note that a configured parent increases the check count threshould by one.
|
||||
|
||||
Also notification settings are required for e-mail and telegram.
|
||||
|
||||
---
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue