aboutsummaryrefslogtreecommitdiffstats
path: root/doc/netwatch-notify.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/netwatch-notify.md')
-rw-r--r--doc/netwatch-notify.md46
1 files changed, 38 insertions, 8 deletions
diff --git a/doc/netwatch-notify.md b/doc/netwatch-notify.md
index 6df233b..91c568f 100644
--- a/doc/netwatch-notify.md
+++ b/doc/netwatch-notify.md
@@ -1,6 +1,13 @@
Notify on host up and down
==========================
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
@@ -40,7 +47,9 @@ The hosts to be checked have to be added to netwatch with specific comment:
Also notification settings are required for
[e-mail](mod/notification-email.md),
-[matrix](mod/notification-matrix.md) and/or
+[gotify](mod/notification-gotify.md),
+[matrix](mod/notification-matrix.md),
+[ntfy](mod/notification-ntfy.md) and/or
[telegram](mod/notification-telegram.md).
### Hooks
@@ -58,9 +67,9 @@ notification is sent.
Getting the escaping right may be troublesome. Please consider adding a
script in `/system/script`, then running that from hook.
-### Count threshould
+### Count threshold
-The count threshould (default is 5 checks) is configurable as well:
+The count threshold (default is 5 checks) is configurable as well:
/tool/netwatch/add comment="notify, name=example.com, count=10" host=104.18.144.11;
@@ -73,18 +82,23 @@ suppress notification if the parent host is down:
/tool/netwatch/add comment="notify, name=example.com, parent=gateway" host=93.184.216.34;
Note that every configured parent in a chain increases the check count
-threshould by one.
+threshold by one.
### Update from DNS
The host address can be updated dynamically. Give extra parameter `resolve`
with a resolvable name:
- /tool/netwatch/add comment="notify, name=example.com, resolve=example.com";
+ /tool/netwatch/add comment="notify, name=example.com, resolve=example.com" host=0.0;
+
+This supports multiple A records for a name just fine, even a CNAME
+to those. An update happens only if no more record with the configured host
+address is found.
+
+The address family is preserved, so if you want AAAA records (for IPv6)
+use this:
-But be warned: Dynamic updates will probably cause issues if the name has
-more than one record in dns - a high rate of configuration changes (and flash
-writes) at least.
+ /tool/netwatch/add comment="notify, name=example.com, resolve=example.com" host=::;
### No notification on host down
@@ -96,6 +110,15 @@ powered off, but accessibility is of interest.
Go and get your coffee ☕️ before sending the print job.
+### No log on failed resolve
+
+A message is writting to log after three failed attemts to resolve a host.
+However this can cause some noise for hosts that are expected to have
+failures, for example when the name is dynamically added by
+[`dhcp-to-dns`](dhcp-to-dns.md). This can be suppressed:
+
+ /tool/netwatch/add comment="notify, name=client, resolve=client.dhcp.example.com, no-resolve-fail" host=10.0.0.0;
+
### Add a note in notification
For some extra information it is possible to add a text note. This is
@@ -103,6 +126,13 @@ included verbatim into the notification.
/tool/netwatch/add comment="notify, name=example, note=Do not touch!" host=10.0.0.31;
+### Add a link in notification
+
+It is possible to add a link in notification, that is added below the
+formatted notification text.
+
+ /tool/netwatch/add comment="notify, name=example.com, resolve=example.com, link=https://example.com/" host=0.0;
+
Tips & Tricks
-------------