Telegram bot message when internet is down.

Hello!
I have an idea to run on my MT script which will send me telegram message when it is NO internet on it or MT switched off =)
Sounds interesting, doesn’t it?
How MT will send a message if it is down or no internet?

But I have an idea!
When router loaded and have an internet - it will send me message “I am back”
Then MT will create scheduled message with 5 minuted delay.
After 4 minutes MT should delete this message and create new b]scheduled message[/b] and so on.
If it will be no internet - MT will not able to delete the previous message and this message will be automatically sent by Telegram even if MT is offline!

What do you think of my idea?
Maybe someone can explain the flaws of this idea to me, or maybe someone has already done it and can share the script?

I have a script/module to Send notifications via Telegram. If notification can not be sent it is queued and sent later. Is that what you want?

The message looks like this when coming from queue…
Screenshot_2022-08-17_00-17-41.png
This one was sent by Forward log messages via notification.

The user want a mesasge when routerboard is down or offline.
But whant that message instantly, not when the routerboard come back online.

Conceptually I think the idea of OP is definitely not wrong.

Yes, but usually I use separate device on battery than send a SMS when something go wrong…
(as backup of the backup, the main Router send W–app message if the LTE device do not work as expected).

The main “The Dude” on another location, also warn if some device are unresponsive.

Your idea is great at some point.. you either need dual WAN balance links in order to send the telegram notification to your telegram group..

in that case you can setup netwatch on mikrotik for each specific interface with your 2 Gateway IPs from your ISPs providers, then shortly after that you can get telegram bot api to receive notification.. if spefici interface LINK 1 or LINK2 gateway IP ping is down for over couple of seconds with ms timeout over 1000ms for example.. you will receive an alert for that.. and when it comes back online you will receive a message again.


The other option is USB or micro USB on your mikrotik in order to get a backup 4G GSM hub with sim active online.. só it can forward the messages from your main WAN unique link if it ever goes down.. u can setup also via netwatch..