Compare commits

..

24 commits

Author SHA1 Message Date
Christian Hesse
daeb173dbc doc/check-routeros-update: add screenshot from terminal 2025-11-25 18:44:52 +01:00
Christian Hesse
4acbd6449e Merge branch 'notifications' into next 2025-11-25 17:37:00 +01:00
Christian Hesse
9db7f4494c doc/sms-forward: update notifications
doc/sms-forward.d/notification.avif
----- >8 -----
[rsc] 📨️ SMS Forwarding from 7277

Received this message by rsc from 7277:

📨️ On 2025-08-20 01:01:15+02:00 type class-0:
Welcome to our network!
----- >8 -----
2025-11-25 17:37:00 +01:00
Christian Hesse
2d0c79160d doc/netwatch-notify: update notifications
doc/netwatch-notify.d/notification-01-down.avif
----- >8 -----
[rsc] ️ Netwatch Notify: ipv6.eworm.de down

The host 'ipv6.eworm.de' (2a01:4f8:222:1e83::80, ipv6.eworm.de) is down since 2025-11-18 11:33:18.
----- >8 -----

doc/netwatch-notify.d/notification-02-up.avif
----- >8 -----
[rsc] ️ Netwatch Notify: ipv6.eworm.de up

The host 'ipv6.eworm.de' (2a01:4f8:222:1e83::80, ipv6.eworm.de) is up since 2025-11-18 11:43:15.
It was down for 10 checks since 2025-11-18 11:33:18.
----- >8 -----
2025-11-25 17:37:00 +01:00
Christian Hesse
b6e72f9a9f doc/log-forward: update notifications
doc/log-forward.d/notification-01-info.avif
----- >8 -----
[rsc] 📝️ Log Forwarding

The log on rsc contains these 2 messages after 00:01:19 uptime.

ℹ️ 2025-11-20 16:40:25 system;info router rebooted by ssh:eworm@10.10.0.37
ℹ️ 2025-11-20 16:40:27 script;info global-functions: Loaded on hAP ax^2 with RouterOS 7.20.4 (stable).
----- >8 -----

doc/log-forward.d/notification-02-warn.avif
----- >8 -----
[rsc] 📝⚠️ Log Forwarding

The log on rsc contains these 3 messages after 01:23:19 uptime.

🟠️ 2025-11-20 17:35:48 dhcp;warning dhcp offering lease 192.168.2.254 for 02:00:BA:DC:AB:1E without success
🔴️ 2025-11-20 17:35:57 dhcp;error pool6 refused acquire: bad preferred prefix! (1)
ℹ️ 2025-11-20 17:36:25 system;info;account user eworm logged in from 10.10.0.37 via ssh
----- >8 -----
2025-11-25 17:37:00 +01:00
Christian Hesse
1b53b52ac6 doc/daily-psk: update notifications
doc/daily-psk.d/notification.avif
----- >8 -----
[rsc] 📅️ daily PSK Guest-Wifi

This is the daily PSK on rsc:

SSID:   Guest-Wifi
PSK:    53cr3t5tr1ng
Date:   2025-11-24

A client device specific rule must not exist!

🔗https://www.eworm.de/cgi-bin/cqrlogo-wifi.cgi?scale=8&ssid=Guest-Wifi&pass=53cr3t5tr1ng
----- >8 -----
2025-11-25 17:37:00 +01:00
Christian Hesse
f77cc07338 doc/collect-wireless-mac: update notifications
doc/collect-wireless-mac.d/notification.avif
----- >8 -----
[rsc] 📱️ 02:00:C0:FF:EE:00 connected to Guest-Wifi

A device with unknown MAC address connected to Guest-Wifi on rsc.

Controller:     rsc
Interface:      wifi1-guest
SSID:           Guest-Wifi
MAC:            02:00:C0:FF:EE:00
Vendor:         locally administered
Hostname:       Wifi-Client
Address:        192.168.1.244
DNS name:       02-00-C0-FF-EE-00.dhcp-guest.rsc.eworm.de
                Wifi-Client.dhcp-guest.rsc.eworm.de
Date:           2025-11-23 15:30:27
----- >8 -----
2025-11-25 17:37:00 +01:00
Christian Hesse
094215aec7 doc/check-routeros-update: update notifications
doc/check-routeros-update.d/notification-01-found.avif
----- >8 -----
[rsc] ️ RouterOS update: 7.20.4

A new RouterOS version 7.20.4 is available for rsc.

Hostname:       rsc
Hardware:
    Board:      hAP ax^2
    Arch:       arm64
    Model:      C52iG-5HaxD2HaxD
    Serial:     HEG08Q4FT32
    License:    level 4
RouterOS:
    Channel:    stable
    Installed:  7.20.2
    Available:  7.20.4
RouterOS-Scripts:
    Commit:     main/3287/699be25b
    Version:    138

🔗https://mikrotik.com/download/changelogs/stable-release-tree
----- >8 -----

doc/check-routeros-update.d/notification-02-neighbor.avif
----- >8 -----
[rsc] ️ RouterOS update: 7.20.4

Seen a neighbor (MikroTik) running version 7.20.4 from stable, updating on rsc...

🔗https://mikrotik.com/download/changelogs/stable-release-tree
----- >8 -----
2025-11-25 17:37:00 +01:00
Christian Hesse
d60ee59e77 doc/check-perpetual-license: update notifications
doc/check-perpetual-license.d/notification-01-warn.avif
----- >8 -----
[rsc] ⚠️ License about to expire!

Your license failed to renew and is about to expire on 2025-09-13 12:12:23 on rsc...
----- >8 -----

doc/check-perpetual-license.d/notification-02-renew.avif
----- >8 -----
[rsc] ️ License renewed

Your license was successfully renewed on rsc. It is now valid until 2025-10-25 08:42:46.
----- >8 -----
2025-11-25 17:37:00 +01:00
Christian Hesse
3926d12070 doc/check-lte-firmware-upgrade: update notifications
doc/check-lte-firmware-upgrade.d/notification.avif
----- >8 -----
[rsc] ️ LTE firmware upgrade

A new firmware version 16121.1034.00.01.01.10 is available for LTE interface lte on rsc.

Model:          FG621-EA
Revision:       16121.1034.00.01.01.09
Firmware version:
    Installed:  16121.1034.00.01.01.09
    Available:  16121.1034.00.01.01.10
----- >8 -----
2025-11-25 17:37:00 +01:00
Christian Hesse
5dbd419d1a doc/check-health: update notifications
doc/check-health.d/notification-01-cpu-utilization-high.avif
----- >8 -----
[rsc] 🧮📈️ Health warning: CPU utilization

The average CPU utilization on rsc is at 79%!
----- >8 -----

doc/check-health.d/notification-02-cpu-utilization-ok.avif
----- >8 -----
[rsc] 🧮📉️ Health recovery: CPU utilization

The average CPU utilization on rsc decreased to 64%.
----- >8 -----

doc/check-health.d/notification-03-ram-utilization-high.avif
----- >8 -----
[rsc] 🗃️📈️ Health warning: RAM utilization

The RAM utilization on rsc is at 88%!

total:  64.0MiB
used:   56.7MiB
free:   7.25MiB
----- >8 -----

doc/check-health.d/notification-04-ram-utilization-ok.avif
----- >8 -----
[rsc] 🗃️📉️ Health recovery: RAM utilization

The RAM utilization on rsc decreased to 75%.
----- >8 -----

doc/check-health.d/notification-05-voltage.avif
----- >8 -----
[rsc] 📉️ Health warning: voltage

The voltage on rsc jumped more than 10%.

old value:  23.8V
new value:  16.2V
----- >8 -----

doc/check-health.d/notification-06-temperature-high.avif
----- >8 -----
[rsc] 🔥️ Health warning: cpu-temperature

The cpu-temperature on rsc is above threshold: 74°C
----- >8 -----

doc/check-health.d/notification-07-temperature-ok.avif
----- >8 -----
[rsc] ️ Health recovery: cpu-temperature

The cpu-temperature on rsc dropped below threshold: 64°C
----- >8 -----

doc/check-health.d/notification-08-state-fail.avif
----- >8 -----
[rsc] ️ Health warning: psu2-state

The device 'psu2-state' on rsc failed!
----- >8 -----

doc/check-health.d/notification-09-state-ok.avif
----- >8 -----
[rsc] ️ Health recovery: psu2-state

The device 'psu2-state' on rsc recovered!
----- >8 -----
2025-11-25 17:37:00 +01:00
Christian Hesse
ac6aefd34c doc/check-certificates: update notifications
doc/check-certificates.d/notification-01-warn.avif
----- >8 -----
[rsc] 🔏⚠️ Certificate warning: rsc.eworm.de

A certificate on rsc is about to expire.

Name:           rsc.eworm.de
CommonName:     rsc.eworm.de
SubjectAltNames:
                DNS:rsc.eworm.de
Private key:    available
Fingerprint:    f21bd7e64eef82b963938fecd07ab0210194129d7829ba08c2d212d063f3b07c
Issuer chain:   E7 -> ISRG Root X2
Validity:
    from:       2025-09-09 13:30:10
    to:         2025-12-07 13:30:09
Expires in:     1w 3d 11:37:06
----- >8 -----

doc/check-certificates.d/notification-02-renew.avif
----- >8 -----
[rsc] 🔏️ Certificate renewed: rsc.eworm.de

A certificate on rsc has been renewed.

Name:           rsc.eworm.de
CommonName:     rsc.eworm.de
SubjectAltNames:
                DNS:rsc.eworm.de
Private key:    available
Fingerprint:    f21bd7e64eef82b963938fecd07ab0210194129d7829ba08c2d212d063f3b07c
Issuer chain:   E7 -> ISRG Root X2
Validity:
    from:       2025-11-07 13:30:09
    to:         2026-02-05 13:30:08
Expires in:     11w 3d 02:25:23
----- >8 -----
2025-11-25 17:37:00 +01:00
Christian Hesse
518a4c329f doc/backup-upload: update notifications
doc/backup-upload.d/notification.avif
----- >8 -----
[rsc] 💾⬆️ Backup & Config upload

Backup and config export upload for rsc.

Hostname:       rsc
Hardware:
    Board:      hAP ax^2
    Arch:       arm64
    Model:      C52iG-5HaxD2HaxD
    Serial:     HEG08Q4FT32
    License:    level 4
RouterOS:
    Channel:    stable
    Installed:  7.20.4
RouterOS-Scripts:
    Commit:     main/3287/699be25b
    Version:    138

Backup file:
    name:       rsc-eworm-de.backup
    size:       372kiB
Export file:
    name:       rsc-eworm-de.rsc
    size:       377kiB
Config file:
    name:       rsc-eworm-de.conf
    size:       3.26kiB
----- >8 -----
2025-11-25 17:37:00 +01:00
Christian Hesse
9ef3ba5479 doc/backup-cloud: update notifications
doc/backup-cloud.d/notification.avif
----- >8 -----
[rsc] 💾☁️ Cloud backup

Uploaded backup for rsc to cloud.

Hostname:       rsc
Hardware:
    Board:      hAP ax^2
    Arch:       arm64
    Model:      C52iG-5HaxD2HaxD
    Serial:     HEG08Q4FT32
    License:    level 4
RouterOS:
    Channel:    stable
    Installed:  7.20.4
RouterOS-Scripts:
    Commit:     main/3287/699be25b
    Version:    138

Name:           cloud-20251124-092255
Size:           180kiB
Download key:   lteX51vlEnrV4OSXfUngu8d
----- >8 -----
2025-11-25 17:37:00 +01:00
Christian Hesse
84c49c0f7e README: update notifications
README.d/notification-news-and-changes.avif
----- >8 -----
[rsc] 📌️ News and configuration changes

The configuration version on thyone increased to 138, current configuration may need modification. Please review and update global-config-overlay, then re-run global-config.

Changes:
 📌️ Added support to send notifications via Gotify (gotify.net).
 📌️ RouterOS 7.19 is suffering an issue with certificate store. Fixing trust state for all certificates...
----- >8 -----
2025-11-25 17:28:26 +01:00
Christian Hesse
bc174d7f1f general/style: add a margin to notification when floating 2025-11-25 17:23:01 +01:00
Christian Hesse
678fc3307e general/style: clear floating on hr 2025-11-25 17:23:01 +01:00
Christian Hesse
1ac0147fce sms-forward: mark every message with an envelope 2025-11-25 17:23:01 +01:00
Christian Hesse
1f6c43d5ce check-certificates: show lock-with-ink-pen symbol in notification...
... also for warning, but of course keep the warning sign.
2025-11-25 17:23:01 +01:00
Christian Hesse
544e8094de contrib/notification: increase font size for heading 2025-11-25 17:23:01 +01:00
Christian Hesse
d4979146f9 contrib/notification: disable the border-radius for logo 2025-11-25 17:23:01 +01:00
Christian Hesse
ca487376d6 contrib/notification: use rsc.eworm.de for default link 2025-11-25 17:23:01 +01:00
Christian Hesse
ea9e843ae9 contrib/html: add a class for code...
... and make sure the notification generator does not suffer
strange styles.
2025-11-25 17:23:01 +01:00
Christian Hesse
94514a7c75 doc/check-routeros-update: update the forum link 2025-11-25 17:23:01 +01:00
40 changed files with 30 additions and 17 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Before After
Before After

View file

@ -231,7 +231,7 @@
:local State [ $IfThenElse (($CertVal->"expired") = true) "expired" "is about to expire" ];
$SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "warning-sign" ] . "Certificate warning: " . ($CertVal->"name")); \
subject=([ $SymbolForNotification "lock-with-ink-pen,warning-sign" ] . "Certificate warning: " . ($CertVal->"name")); \
message=("A certificate on " . $Identity . " " . $State . ".\n\n" . [ $FormatInfo $Cert ]) });
$LogPrint info $ScriptName ("The certificate '" . ($CertVal->"name") . "' " . $State . \
", it is invalid after " . ($CertVal->"invalid-after") . ".");

View file

@ -14,7 +14,7 @@ markdown -f toc,idanchor "${1}" | sed \
-e 's/href="\([-_\./[:alnum:]]*\)\.md\(#[-[:alnum:]]*\)\?"/href="\1.html\2"/g' \
-e '/<h[1234] /s| id="\(.*\)">| id="\L\1">|' \
-e '/<h[1234] /s|-2[1789cd]-||g' -e '/<h[1234] /s|--26-amp-3b-||g' \
-e '/^<pre>/s|pre|pre onclick="CopyToClipboard(this)"|g' \
-e '/^<pre>/s|pre|pre class="code" onclick="CopyToClipboard(this)"|g' \
-e '/The above link may be broken on code hosting sites/s|blockquote|blockquote style="display: none;"|'
sed \

View file

@ -31,7 +31,7 @@ instead.</p></blockquote>
<div class="content">
<p id="heading" class="heading">[<span id="hostname">MikroTik</span>] <span id="subject"> Subject</span></p>
<pre id="message">Message</pre>
<p id="link" class="hint">🔗 <span id="link-text" class="link">https://eworm.de/</span></p>
<p id="link" class="hint">🔗 <span id="link-text" class="link">https://rsc.eworm.de/</span></p>
<p id="queued" class="hint">⏰ This message was queued since <i><span id="queued-since">2025-10-29 16:06:18</span></i> and may be obsolete.</p>
<p id="cut" class="hint">✂️ The message was too long and has been truncated, cut off <i><span id="cut-percent">13</span>%</i>!</p>
</div>
@ -40,7 +40,7 @@ instead.</p></blockquote>
<p>Hostname: <input type="text" value="MikroTik" onchange="update(this, 'hostname')"></p>
<p>Subject: <input type="text" size=50 value=" Subject" onchange="update(this, 'subject')"></p>
<p>Message: <textarea id="w3review" name="w3review" rows="4" cols="50" onchange="update(this, 'message')">Message</textarea></p>
<p><input type="checkbox" onclick="visible(this, 'link')"> Show link: <input type="text" value="https://eworm.de/" onchange="update(this, 'link-text')"></p>
<p><input type="checkbox" onclick="visible(this, 'link')"> Show link: <input type="text" value="https://rsc.eworm.de/" onchange="update(this, 'link-text')"></p>
<p><input type="checkbox" onclick="visible(this, 'queued')"> Queued since <input type="text" value="2025-10-29 16:06:18" onchange="update(this, 'queued-since')"></p>
<p><input type="checkbox" onclick="visible(this, 'cut')"> Cut-off with <input type="number" min=1 max=99 value=13 onchange="update(this, 'cut-percent')"> percent</p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

View file

@ -19,9 +19,10 @@ Description
This script tries to download and renew certificates, then notifies about
certificates that are still about to expire.
### Sample notification
### Sample notifications
![check-certificates notification](check-certificates.d/notification.avif)
![check-certificates notification warning](check-certificates.d/notification-01-warn.avif)
![check-certificates notification renew](check-certificates.d/notification-02-renew.avif)
Requirements and installation
-----------------------------

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

View file

@ -20,9 +20,10 @@ On *Cloud Hosted Router* (*CHR*) the licensing is perpetual: Buy once, use
forever - but it needs regular renewal. This script checks licensing state
and sends a notification to warn before expiration.
### Sample notification
### Sample notifications
![check-perpetual-license notification](check-perpetual-license.d/notification.avif)
![check-perpetual-license notification warn](check-perpetual-license.d/notification-01-warn.avif)
![check-perpetual-license notification renew](check-perpetual-license.d/notification-02-renew.avif)
Requirements and installation
-----------------------------

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -31,13 +31,14 @@ automatically is supported.
> of view. At the same time it can be source of serve breakage. So test
> versions in lab and read
> [changelog ↗️](https://mikrotik.com/download/changelogs/) and
> [forum ↗️](https://forum.mikrotik.com/viewforum.php?f=21) before deploying
> [forum ↗️](https://forum.mikrotik.com/c/announcements/5) before deploying
> to your production environment! Automatic updates should be handled
> with care!
### Sample notification
### Sample notifications
![check-routeros-update notification](check-routeros-update.d/notification.avif)
![check-routeros-update notification found](check-routeros-update.d/notification-01-found.avif)
![check-routeros-update notification neighbor](check-routeros-update.d/notification-02-neighbor.avif)
Requirements and installation
-----------------------------
@ -87,6 +88,8 @@ Be notified when run from scheduler or run it manually:
If an update is found you can install it right away.
![Terminal](check-routeros-update.d/terminal.avif)
Installing script [packages-update](packages-update.md) gives extra options.
Tips & Tricks

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6 KiB

View file

@ -35,9 +35,10 @@ The script works around the limitations, for example it does:
It is intended to be run periodically from scheduler, then collects new
log messages and forwards them via notification.
### Sample notification
### Sample notifications
![log-forward notification](log-forward.d/notification.avif)
![log-forward notification info](log-forward.d/notification-01-info.avif)
![log-forward notification warn](log-forward.d/notification-02-warn.avif)
Requirements and installation
-----------------------------

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Before After
Before After

View file

@ -39,15 +39,19 @@ div.notification {
div.content {
padding-left: 60px;
}
hr {
clear: both;
}
img.logo {
float: left;
border-radius: 50%;
/* border-radius: 50%; */
}
p.foot {
color: #777;
text-align: center;
}
p.heading {
font-size: 120%;
margin: 0px;
font-weight: bold;
text-decoration: underline;
@ -58,6 +62,8 @@ p.hint {
pre {
font-family: fira-mono, monospace;
white-space: pre-wrap;
}
pre.code {
background-color: #f8f8f8;
border: 1px solid #ccc;
overflow: auto;
@ -69,7 +75,7 @@ pre code {
padding: 0;
border: 0;
}
pre::before {
pre.code::before {
content: "📋 Copy!";
float: right;
border: 1px solid #ccc;
@ -97,5 +103,6 @@ td.head .bottom {
}
div.notification {
float: right;
margin: 10px;
}
}

View file

@ -68,8 +68,8 @@
$LogPrint warning $ScriptName ("Failed to remove message: " . $Err);
}
} else={
:set Messages ($Messages . "\n\nOn " . $SmsVal->"timestamp" . \
" type " . $SmsVal->"type" . ":\n" . $SmsVal->"message");
:set Messages ($Messages . "\n\n" . [ $SymbolForNotification "incoming-envelope" ] . \
"On " . $SmsVal->"timestamp" . " type " . $SmsVal->"type" . ":\n" . $SmsVal->"message");
:foreach Hook in=$SmsForwardHooks do={
:if ($Phone~($Hook->"allowed-number") && ($SmsVal->"message")~($Hook->"match")) do={
:if ([ $ValidateSyntax ($Hook->"command") ] = true) do={