netwatch-notify: implement pre-down hook

This commit is contained in:
Christian Hesse 2021-07-09 11:27:26 +02:00
parent 12d34e4a7c
commit bccb7c3452
6 changed files with 11 additions and 3 deletions

View file

@ -44,6 +44,10 @@ comment:
/ tool netwatch add comment="notify, hostname=poe-device, down-hook=/ interface ethernet poe power-cycle en21;" host=10.0.0.20;
Also there is a `pre-down-hook` that fires at two thirds of failed checks
required for the notification. The idea is to fix the issue before a
notification is sent.
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;