Dude Telegram notification example

did you select this type of notification for this device?

You mean in : Notification > Advanced tab ? Yes click them all. Is there anywhere else i can check them ?

/tool fetch url=“https://api.telegram.org/botxxxxxxxxx:yyyyyyyyySMp2Oz7gyZOeNmq1pDcJ-o/sendMessage?chat_id=-12121212&text=[Probe.Name] on [Device.Name] now [Service.Status] ([Service.ProblemDescription])”
It work’s when i try test, it send’s message in chat, but when swich drop nothing happens

so, if you had created it notifications for all status changing you want(for example with name “telegram”), than, if you want to have it for all devices. go to settings-polling. make sure that “enabled” is marked and that in the list of notifications there is mark near “telegram”
if you want to have it only for particular device: open this device, polling. make sure that there are marks near “polling”, ‘use notifications’ and ‘telegram’

Damn Dude !!! You are a genious.
Thank’s a lot for this small but HUGE help. It work’s

Why does the ? disappear when you paste in terminal ?

/tool fetch “https://api.telegram.org/botblablabla/sendMessage?chat_id=-1111111111&text=thissatest” keep-result=no
turns to /tool fetch “https://api.telegram.org/botblablabla/sendMessagechat_id=-1111111111&text=thissatest” keep-result=no ..can’t even write it manually.

This command in terminal fails. I had to make a script just to make it work - don’t know yet if you can use this as a global variable.

Hai all.. i have ros 6.41.2 on ccr.. notif from netwatch run.. but when notif from dude.. nothing happen.. any sugestion ?

Thanks

Sent from my HTC One_E8 dual sim using Tapatalk

Hi,
I have configured telegram notifications on dude and the manual have an error

https://wiki.mikrotik.com/wiki/Manual:The_Dude_v6/Dude_Telegram_Example

the correct example would be

/tool fetch url=“https://api.telegram.org/bot309683994:AAFh8645FeAOgUbcOgUVIhtclbmzpwwIXpAB/sendMessage?chat_id=-312605050&text=ExampleMessage” keep-result=no

instead of:

/tool fetch url=“https://api.telegram.org/bot309683994:AAFh8645FeAOgUbcOgUVIhtclbmzpwwIXpAB/sendMessage?chat_id=312605050&text=ExampleMessage” keep-result=no

you have to add “-” sign before chat_id number.

Any chance to refine this example to include some way for it to check the previous state of the device? or maybe suggestions on increasing my tiggers to avoid getting repetitive “up” status messages when I have never received any down messages on that device? dont get me wrong… I get correct down messages when things actually go down (I only probe with ping and routeros management(when it is an RB)) but I get repetitive up messages.

honestly if there was a way to ONLY get down messages id be fine with that also

edit: duh!!! just looked at dude and i can remove “up” messages.

The problem is at the moment of entering the interrogation (?), Mikrotik exchanges “sendMessage? Chat_id” with “sendMessagechat_id”.

Forgive me for my English.

i’m running the dude 6.42.10 on ccr1016 .. but the notification for down device not show up .. only up notification in telegram
i use the script from the wiki .. any suggestion ?

I had the same problem in my dude server (6.43.:sunglasses:. The fetch tool didn’t works when i pressed the “test” button, but you need to execute that command on a terminal in your dude’s winbox to see a result or another possible ideas. The link must be in quotes! Don’t forget that!

/tool fetch url=“https://api.telegram.org/botXXXXX/sendMessage?chat_id=-XXXXXXX&text=HiThere

I tested with 6.44.3 (cannot use other version because incompatible of any devices) and dont work!! Help!!!

Here is my experience with telegram notifications.

My Setup:

I have two Dude servers, hex (mmimps) and CCR1009-8g-1S-1S+ (tile) both on 6.44.2

I can get the telegram bot to work perfect on the hex except if I enter the command via CLI Terminal. I get

status: failed

failure: closing connection: <404 Not Found> 149.154.167.220:443 (4)

But I setup a notification and the test button and real world alerts works.

The second dude server on the CCR should be identical the setup as the hex but I get this message if I type the same command via CLI Terminal

status: failed

failure: ssl connection error: internal error (6)

But I setup the notification tool identical to the hex and the test button or the real alerts don’t work.

From both routers I can ping external IP’s and DNS names no problem so I’m not totally sure what could cause a ssl connection error.

I would like to send an update on how I fixed my issues.

My firewall had telegram.com blocked through the content filter. One dude server was exempt and the other dude server wasnt.

Hello everyone, the code is actually working in RouterOS 6.43.16; but if you want to add a biggest message, you’ll need to add %20 instead of a space; so please update the Wiki.

New code from text:

text=Time:> %20> [Time];> %20> Device:> %20> [Device.FirstAddress];> %20> Status:> %20> [Service.Status]"

Can anyone post a VIBER fetch command?

Got working Slack fetch command, got working Microsoft Teams command, read that it’s easy with telegram and WhatsApp… To bad that I need one for the Viber but cannot crack that one out.

Try this

&text=🖥 Device: [Device.FirstAddress] - <b>[Device.Name]</b>;%0A⏰ Time: [Time];%0Aℹ Status: <b>[Service.Status]</b>&parse_mode=HTML" keep-result=no

Hello!! im using the same version! can you share the command you are using in notifications?

Regards!

Notifications in telegrams are of interest only for notifications to come not in private messages but in general chat. Configured as indicated above in private messages come and if in the chat then gives an error. Maybe someone came across this?