SWARM - Watchdog Telegram Notifications

In the following article you will find instructions on how to create your own bot and use it together with SWARM to monitor your node. At least SWARM v1.0.10 is required!


Download and install the telegram messenger for your platform. Start the telegram client and follow the registration process.

Create Telegram Bot

Start a conversation with the @BotFather. The easiest way is via the global search for the username.


Create a new bot:

Code
/newbot

1_swarm-telegram.png


2_swarm-telegram.png


Choose a user-friendly name for your bot, for example:

3_swarm-telegram.png

Choose a unique username for your bot (must ends with “bot”), for example:


4_swarm-telegram.png


Enter the bot token into SWARM:

Go to SWARM main menu -> SWARM menu -> Watchdog configuration -> Telegram notifications [Watchdog] -> Set telegram bot token

5_swarm-telegram.png


Get The Chat ID


To get the chat ID, open the following URL in your web-browser:

Code
https://api.telegram.org/bot<TOKEN>/getUpdates

(Replace <TOKEN> with your bot token)


6_swarm-telegram.png



Open a new chat with the newly created bot. Just click on the link e.g. t.me/MyNode_SWARM_Bot and press Start.

7_swarm-telegram.png


Then type Hello into the chat as an example.


8_swarm-telegram.png


Now go back to the browser and refresh the page:


9_swarm-telegram.png


There you search for the following string "chat":{"id":655025690


Now add the ID under SWARM main menu -> SWARM menu -> Watchdog configuration -> Telegram notifications [Watchdog] -> Set Telegram Channel ID

10_swarm-telegram.png


Enable the Telegram notifications

Enable under SWARM main menu -> SWARM menu -> Watchdog configuration -> Telegram notifications [Watchdog] -> Enable Telegram Notifications

11_swarm-telegram.png


If everything is set up correctly, you will already receive your first notification.

12_swarm-telegram.png


You can also use the bot token and channel ID on multiple nodes and receive the notifications for it.