mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-11-16 19:41:58 +00:00
Signalgrid provides a simple API to developers, sysadmins, and ops teams for sending push notifications to iOS, Android, Browsers and more. https://signalgrid.co/ Co-authored-by: Christian Hesse <[email protected]>
92 lines
3.5 KiB
Markdown
92 lines
3.5 KiB
Markdown
Send notifications via Signalgrid
|
||
=================================
|
||
|
||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||
[](https://mikrotik.com/download/changelogs/)
|
||
[](https://t.me/routeros_scripts)
|
||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||
|
||
[⬅️ Go back to main README](../../README.md)
|
||
|
||
> ℹ️️ **Info**: This module can not be used on its own but requires the base
|
||
> installation. See [main README](../../README.md) for details.
|
||
|
||
Description
|
||
-----------
|
||
|
||
This module adds support for sending notifications via
|
||
[Signalgrid ↗️](https://signalgrid.co/). A queue is used to make sure
|
||
notifications are not lost on failure but sent later.
|
||
|
||
Requirements and installation
|
||
-----------------------------
|
||
|
||
Just install the module:
|
||
|
||
$ScriptInstallUpdate mod/notification-signalgrid;
|
||
|
||
A Signalgrid account is required, that will give you *client key* and
|
||
*channel*.
|
||
|
||
Configuration
|
||
-------------
|
||
|
||
Configure `SignalgridClientKey` and `SignalgridChannel` with the *client key*
|
||
and *channel* from your Signalgrid account.
|
||
|
||
Edit `global-config-overlay`, add the required settings and reload the
|
||
configuration:
|
||
|
||
:global SignalgridClientKey "your-client-key";
|
||
:global SignalgridChannel "your-channel";
|
||
|
||
> ℹ️ **Info**: Copy relevant configuration from
|
||
> [`global-config`](../../global-config.rsc) (the one without `-overlay`) to
|
||
> your local `global-config-overlay` and modify it to your specific needs.
|
||
|
||
Usage and invocation
|
||
--------------------
|
||
|
||
There's nothing special to do. Every script or function sending a notification
|
||
will now send it via Signalgrid.
|
||
|
||
But of course you can use the function to send notifications directly. Give
|
||
it a try:
|
||
|
||
$SendSignalgrid "Subject..." "Body...";
|
||
|
||
A link can optionally be specified:
|
||
|
||
$SendSignalgrid "Subject..." "Body..." "https://example.com/";
|
||
|
||
Alternatively this sends a notification with all available and configured
|
||
methods:
|
||
|
||
$SendNotification "Subject..." "Body...";
|
||
|
||
To use the functions in your own scripts you have to declare them first.
|
||
Place this before you call them:
|
||
|
||
:global SendSignalgrid;
|
||
:global SendNotification;
|
||
|
||
In case there is a situation when the queue needs to be purged there is a
|
||
function available:
|
||
|
||
$PurgeSignalgridQueue;
|
||
|
||
See also
|
||
--------
|
||
|
||
* [Signalgrid documentation ↗️](https://docs.signalgrid.co/)
|
||
* [Send notifications via e-mail](notification-email.md)
|
||
* [Send notifications via Gotify](notification-gotify.md)
|
||
* [Send notifications via Matrix](notification-matrix.md)
|
||
* [Send notifications via Ntfy](notification-ntfy.md)
|
||
* [Send notifications via Telegram](notification-telegram.md)
|
||
|
||
---
|
||
[⬅️ Go back to main README](../../README.md)
|
||
[⬆️ Go back to top](#top)
|