aboutsummaryrefslogtreecommitdiffstats
path: root/netwatch-notify.rsc
AgeCommit message (Expand)AuthorFilesLines
2024-12-09netwatch-notify: use $ExitError to indicate unintentional errorGravatar Christian Hesse1-1/+5
2024-07-25netwatch-notify: do not switch type when resolving•••This requires RouterOS 7.15beta4, but let's bump the required version to next stable release instead. routeros-7.15-1Gravatar Christian Hesse1-2/+3
2024-07-16bump RouterOS requirement for all scripts and modules...•••... now that global-functions requires RouterOS 7.14 anyway. Gravatar Christian Hesse1-1/+1
2024-04-23netwatch-notify: log to debug...•••... instead of discarding the message completely. Gravatar Christian Hesse1-2/+3
2024-04-19netwatch-notify: allow to suppress resolve failureGravatar Christian Hesse1-1/+1
2024-04-07bump RouterOS requirement for all scripts and modules...•••... now that global-functions requires RouterOS 7.13 anyway. routeros-7.13-6Gravatar Christian Hesse1-1/+1
2024-03-20netwatch-notify: pass script name into local functionsGravatar Christian Hesse1-14/+16
2024-03-13netwatch-notify: pass link to notification•••This is pass verbatim below the notification text. change-124Gravatar Christian Hesse1-2/+2
2024-03-12netwatch-notify: switch to $LogPrintGravatar Christian Hesse1-16/+13
2024-03-12netwatch-notify: drop main function, use :do with on-errorGravatar Christian Hesse1-6/+4
2024-03-12global-functions: $ScriptLock: do not exit from global functionGravatar Christian Hesse1-1/+3
2024-03-04netwatch-notify: move code into functionGravatar Christian Hesse1-165/+170
2024-03-03netwatch-notify: check one after another•••This can bring an extra delay, but saves a check in most cases. Gravatar Christian Hesse1-2/+5
2024-03-02netwatch-notify: handle IPv6 / AAAA resolvingGravatar Christian Hesse1-1/+3
2024-03-01netwatch-notify: (mis-)use firewall address-list for lookup...•••... and drop the racy code querying dns cache. ๐Ÿ˜ Gravatar Christian Hesse1-11/+5
2024-02-28netwatch-notify: handle CNAME to multiple recordsGravatar Christian Hesse1-0/+9
2024-02-28netwatch-notify: move check in DNS cache to local functionGravatar Christian Hesse1-2/+14
2024-02-28netwatch-notify: try another workaround•••The last one did not make it... Perhaps the cache just needs a moment to settle? Gravatar Christian Hesse1-4/+2
2024-02-28netwatch-notify: work around race condition•••This used to crash every now and then with: > script;error script error: no such item (4) I guess this is caused by querying the dns cache just exactly when a record expires. The chance is maximized: The script is started by scheduler every minute, and the record's ttl is a multiple of a minute. Let's query records that are not about to expire immediately, and try again. Gravatar Christian Hesse1-8/+12
2024-02-28netwatch-notify: restore the check ๐Ÿฅด•••This reverts commit 28da1da49e275fef6089a103edf6c158bbff317f. Chances are that we have to resolve a CNAME, that does not match when querying the cache. How to handle CNAME do multiple A records? ๐Ÿคจ Gravatar Christian Hesse1-1/+2
2024-02-28netwatch-notify: simplify the checkGravatar Christian Hesse1-2/+1
2024-02-28netwatch-notify: ... and switch state to "unknown" on host updateGravatar Christian Hesse1-0/+1
2024-02-28netwatch-notify: handle status "down" in its own condition...•••... instead of else-branch. This makes sure to skip hosts that just became "unknown". (Possible soon!) Gravatar Christian Hesse1-1/+4
2024-02-28netwatch-notify: use logical operator, no literal "and"•••Just like we do everywhere else. Gravatar Christian Hesse1-1/+1
2024-02-19netwatch-notify: do not update with record in cache•••Using `:resolve` we have just one address, but chances are several records do exist. These end up in cache, so we are happy to find them there - no need to update then. Gravatar Christian Hesse1-1/+2
2024-01-30netwatch-notify: use :jobname to get script nameGravatar Christian Hesse1-1/+3
2024-01-01update copyright for 2024Gravatar Christian Hesse1-1/+1
2023-10-27netwatch-notify: match on word boundaryGravatar Christian Hesse1-1/+1
2023-09-29netwatch-notify: allow to give different origin for hosts...•••... to use differing notification settings. Add an origin name in netwatch configuration: /tool/netwatch/add comment="notify, name=dns-google, origin=netwatch-notify-google" address=8.8.8.8; /tool/netwatch/add comment="notify, name=dns-cloudflare, origin=netwatch-notify-cloudflare" address=1.1.1.1; Then configure the notification settings in `global-config-overlay`: :global EmailGeneralToOverride { "netwatch-notify-google"="google@example.com"; "netwatch-notify-cloudflare"="cloudflare@example.com"; } I think it is best to handle this as a hidden setting... Handle with care! Gravatar Christian Hesse1-6/+4
2023-08-18netwatch-notify: drop RouterOS version dependency•••... as global-functions depend on RouterOS 7.9beta already. Gravatar Christian Hesse1-2/+0
2023-06-28netwatch-notify: drop the delay on startup...•••... now that in RouterOS 7.9 netwatch itself comes with a startup-delay. Hosts in state 'unknown' are just ignored. routeros-7.9beta4-6Gravatar Christian Hesse1-4/+2
2023-05-31netwatch-notify: ignore status 'unknown'Gravatar Christian Hesse1-1/+1
2023-03-20netwatch-notify: support note in notificationchange-96Gravatar Christian Hesse1-0/+6
2023-03-07rename scripts and add file extension ".rsc"•••No functional change for the user... The migration is done automatically. change-95Gravatar Christian Hesse1-0/+186