Community discussions

 
User avatar
PaulsMT
MikroTik Support
MikroTik Support
Topic Author
Posts: 283
Joined: Tue Feb 10, 2015 3:21 pm

Dude Telegram notification example

Mon Jan 09, 2017 10:59 am

Currently it's not possible to use HTTP POST method from Dude/RouterOS, so here is some workaround example how to use Telegram, to send messages using HTTP GET method:

http://wiki.mikrotik.com/wiki/Manual:Th ... am_Example

Suggestions / requests will be appreciated.
 
turnip
Frequent Visitor
Frequent Visitor
Posts: 66
Joined: Wed Sep 11, 2013 7:01 pm

Re: Dude Telegram notification example

Tue Jan 10, 2017 2:58 am

That's a great solution... I'm having trouble though - I can run the /tool fetch command from the command line and it works fine, but nothing happens when I run it from The Dude. I've tried pressing Test, and I've tried unplugging a router to see what happens, and the command never executes. Can't see anything in the logs. Any ideas?
 
turnip
Frequent Visitor
Frequent Visitor
Posts: 66
Joined: Wed Sep 11, 2013 7:01 pm

Re: Dude Telegram notification example

Tue Jan 10, 2017 4:23 am

Never mind, just noticed this:
Changes in v6.39rc7:

*) Fixed - Tool fetch didn't work with notification - execute on server

Upgrading now
 
sparker
just joined
Posts: 23
Joined: Mon Jan 23, 2012 5:48 pm
Location: Russia / Chelyabinsk

Re: Dude Telegram notification example

Wed Jan 18, 2017 7:42 am

Never mind, just noticed this:
Changes in v6.39rc7:

*) Fixed - Tool fetch didn't work with notification - execute on server

Upgrading now
OR
:execute {/tool fetch url="https://api.telegram.org/botXXXXXX:AsG7sapGXDS1aHi_RllzgU9oJUm2wyKyHVw/sendMessage\?chat_id=1231231&text=[TimeAndDate] Service [Probe.Name] on [Device.Name] ([Device.CustomField1] - [Device.CustomField2]) is now [Service.Status] ([Service.ProblemDescription])" keep-result=no}
this option works for older versions
Sorry for my English.
 
dricks
just joined
Posts: 13
Joined: Fri Jan 08, 2010 7:31 pm
Location: Embarcacion

Re: Dude Telegram notification example

Wed Feb 15, 2017 8:21 am

I configured all and is working!!!

Correct code for Version 6.38.1 - Please update de wiki
 /tool fetch url="https://api.telegram.org/botXXXXXXX:AAFZJtaHT_of7tV9IPEyK9R9XXXXFtk9_Ap-Pvk/sendMessage\?chat_id=XXXXXX&text=[TimeAndDate] Nodo: [Device.Name], Status: [Service.Status]" keep-result=no 

Gretting

Pablo
Sorry for my bad English
 
User avatar
amt
Long time Member
Long time Member
Posts: 525
Joined: Fri Jan 16, 2015 2:05 pm

Re: Dude Telegram notification example

Wed Feb 22, 2017 1:44 pm

Hi,

what should be the chat_id= ??

thanks
 
Shadeofspirit
Member Candidate
Member Candidate
Posts: 204
Joined: Fri May 27, 2016 12:15 am
Location: Minsk
Contact:

Re: Dude Telegram notification example

Wed Feb 22, 2017 2:02 pm

Hi,

what should be the chat_id= ??

thanks
after creating the bot you can write to him. from browser you can see the id of this chat (you can use https://api.telegram.org/botXXXXXXXXXXX ... getUpdates )
You should find "«chat»:{«id»:YYYYYYY"
YYYYYYY - is your chat_id
MTCNA, MTCWE
 
User avatar
amt
Long time Member
Long time Member
Posts: 525
Joined: Fri Jan 16, 2015 2:05 pm

Re: Dude Telegram notification example

Wed Feb 22, 2017 3:35 pm

thank you verymuch... its work. I would like to ask another question, is possible to do this on viber also ?

Thanks.
 
Shadeofspirit
Member Candidate
Member Candidate
Posts: 204
Joined: Fri May 27, 2016 12:15 am
Location: Minsk
Contact:

Re: Dude Telegram notification example

Thu Feb 23, 2017 3:26 pm

thank you verymuch... its work. I would like to ask another question, is possible to do this on viber also ?

Thanks.
yes you can. +37544five44340five
MTCNA, MTCWE
 
User avatar
tamigi
just joined
Posts: 4
Joined: Thu Jan 26, 2017 10:39 am
Contact:

Re: Dude Telegram notification example

Mon Feb 27, 2017 7:57 pm

What's the problem in settings .

Image
 
User avatar
tomasi
Frequent Visitor
Frequent Visitor
Posts: 71
Joined: Fri Oct 03, 2014 6:40 pm
Location: Brazil
Contact:

Re: Dude Telegram notification example

Wed Mar 01, 2017 10:23 pm

Hi,

I've tested the hyperlink, that it's inside the fetch command:
https://api.telegram.org/bot123456789:AAQFb1byb3LEwMes_TQeCM1k5wsFb_VguhG/sendMessage\?chat_id=123456789&text=Hello
But It doesn't even send the Hello message to the group the bot is participating.

The webpage says: "{"ok":false,"error_code":404,"description":"Not Found: method not found"}"

In Mikrotik terminal, it says: failure: closing connection: <400 Bad Request> 149.154.167.200:443 (4)

Am I doing something wrong? Do I need any additional step to allow the bot start a message?

Thanks! :?
 
User avatar
FlavioCamacho
Trainer
Trainer
Posts: 33
Joined: Tue Jun 24, 2014 7:39 am
Location: Rio de Janeiro - Brasil
Contact:

Re: Dude Telegram notification example

Thu Mar 02, 2017 2:53 am

What do you think of adapting the dude to send messages through Whatsapp it is much more popular than the telegran.
Mikrotik Training Partner
 
User avatar
amt
Long time Member
Long time Member
Posts: 525
Joined: Fri Jan 16, 2015 2:05 pm

Re: Dude Telegram notification example

Thu Mar 02, 2017 10:24 am

What do you think of adapting the dude to send messages through Whatsapp it is much more popular than the telegran.
or viber...
 
User avatar
soonwai
Member Candidate
Member Candidate
Posts: 162
Joined: Mon Feb 06, 2012 10:50 pm
Location: Kuala Lumpur

Re: Dude Telegram notification example

Thu Mar 02, 2017 6:28 pm

or viber...
You can do the same with Viber. Use a Viber "Public Account". I haven't tried yet as it's only available for selected countries.

Telegram is so far the easiest and most accessible.
 
irghost
Member Candidate
Member Candidate
Posts: 277
Joined: Sun Feb 21, 2016 1:49 pm

Re: Dude Telegram notification example

Thu Mar 02, 2017 7:24 pm

Hi,

I've tested the hyperlink, that it's inside the fetch command:
https://api.telegram.org/bot123456789:AAQFb1byb3LEwMes_TQeCM1k5wsFb_VguhG/sendMessage\?chat_id=123456789&text=Hello
But It doesn't even send the Hello message to the group the bot is participating.

The webpage says: "{"ok":false,"error_code":404,"description":"Not Found: method not found"}"

In Mikrotik terminal, it says: failure: closing connection: <400 Bad Request> 149.154.167.200:443 (4)

Am I doing something wrong? Do I need any additional step to allow the bot start a message?

Thanks! :?
/tool fetch url="https://api.telegram.org/botxxxxxxxxxxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/sendmessage?chat_id=xxxxxx&text=Hi" keep-result=no
MTCNA MTCRE MTCTCE MTCUME MTCWE MTCIPv6E MTCINE
 
marnem
just joined
Posts: 2
Joined: Fri Mar 03, 2017 6:09 pm

Re: Dude Telegram notification example

Fri Mar 03, 2017 6:13 pm

/tool fetch url="https://api.telegram.org/bot<tokenbot>?chat_id=-1001099321185&text=[RECOVER] [TimeAndDate]; [Device.Name]: [Device.FirstAddress]; Status: [Service.Status] ([Service.ProblemDescription])" keep-result=no
for me this work... in my situation i've created a channel with other my coworker...this is a great solution for notification, very reactive!
and then you can evolute your bot with some scripts, notification db ecc.ecc.
great thing
 
vinu
just joined
Posts: 8
Joined: Sun Mar 05, 2017 8:09 pm
Location: India

Re: Dude Telegram notification example

Sun Apr 23, 2017 7:38 pm

Hi,

I've tested the hyperlink, that it's inside the fetch command:
https://api.telegram.org/bot123456789:AAQFb1byb3LEwMes_TQeCM1k5wsFb_VguhG/sendMessage\?chat_id=123456789&text=Hello
But It doesn't even send the Hello message to the group the bot is participating.

The webpage says: "{"ok":false,"error_code":404,"description":"Not Found: method not found"}"

In Mikrotik terminal, it says: failure: closing connection: <400 Bad Request> 149.154.167.200:443 (4)

Am I doing something wrong? Do I need any additional step to allow the bot start a message?

Thanks! :?

HI
issue fixed??
 
User avatar
tomasi
Frequent Visitor
Frequent Visitor
Posts: 71
Joined: Fri Oct 03, 2014 6:40 pm
Location: Brazil
Contact:

Re: Dude Telegram notification example

Tue Apr 25, 2017 9:16 pm

The issue was fixed, adding a minus sign before the chat ID:

before:
https://api.telegram.org/bot123456789:AAQFb1byb3LEwMes_TQeCM1k5wsFb_VguhG/sendMessage\?chat_id=123456789&text=Hello
after:
https://api.telegram.org/bot123456789:AAQFb1byb3LEwMes_TQeCM1k5wsFb_VguhG/sendMessage\?chat_id=-123456789&text=Hello
:)
 
joca
just joined
Posts: 2
Joined: Sun Aug 26, 2012 1:29 am

Re: Dude Telegram notification example

Thu May 04, 2017 3:25 pm

The issue was fixed, adding a minus sign before the chat ID:

before:
https://api.telegram.org/bot123456789:AAQFb1byb3LEwMes_TQeCM1k5wsFb_VguhG/sendMessage\?chat_id=123456789&text=Hello
after:
https://api.telegram.org/bot123456789:AAQFb1byb3LEwMes_TQeCM1k5wsFb_VguhG/sendMessage\?chat_id=-123456789&text=Hello
:)
remove \ from "sendMessage\?chat_id="
 
alisc
Frequent Visitor
Frequent Visitor
Posts: 59
Joined: Thu Dec 01, 2011 10:51 am

Re: Dude Telegram notification example

Thu Jul 27, 2017 7:29 pm

hi
how to send file ( backup file ) via Telegram ?
I'm not English
my english not so good , excuse me
 
Morcegolas
just joined
Posts: 4
Joined: Sat Jul 29, 2017 4:29 am

Re: Dude Telegram notification example

Sun Jul 30, 2017 8:23 pm

I configured all and is working!!!

Correct code for Version 6.38.1 - Please update de wiki
 /tool fetch url="https://api.telegram.org/botXXXXXXX:AAFZJtaHT_of7tV9IPEyK9R9XXXXFtk9_Ap-Pvk/sendMessage\?chat_id=XXXXXX&text=[TimeAndDate] Nodo: [Device.Name], Status: [Service.Status]" keep-result=no

Gretting

Pablo
Sorry for my bad English
I tried this with RouterOS and I receive the messages on telegram, but not the time, device name and status, maybe because in RouterOS its difrent from Dude, is there any chance to get this working also on RouterOS?
hi
how to send file ( backup file ) via Telegram ?
I have automated backups and also like the option to send send via telegram, automated or via command in telegram.

Thanks.
 
Morcegolas
just joined
Posts: 4
Joined: Sat Jul 29, 2017 4:29 am

Re: Dude Telegram notification example

Fri Aug 04, 2017 12:14 am

I already tried so send the file with the two following commands, but get the error code 404, I think the URL is wrong, no ones knows how to send the backup file to telegram?

/tool fetch url="https://api.telegram.org/bot<MyBotApi>/ ... day.backup” keep-result=no

/tool fetch url="https://api.telegram.org/bot<MyBotApi>/ ... day.backup” keep-result=no

Thanks.
 
gangz
just joined
Posts: 4
Joined: Mon Feb 13, 2017 9:53 am

Re: Dude Telegram notification example

Thu Aug 17, 2017 2:06 pm

Hi all!

May be it is offtopic, but i am using telegram notifications from my CCR (not Dude) whrough this URL:
/tool fetch url="https://api.telegram.org/bot<BotToken>/ ... id=<ChatId with "-">&text=Very_Impotant_Tunnel_Up"

Also, I wrote an article about this, but it is on russian...
https://www.1spla.ru/blog/telegram_bot_for_mikrotik
 
User avatar
indjov
just joined
Posts: 20
Joined: Fri Jun 03, 2016 12:23 pm

Re: Dude Telegram notification example

Tue Sep 12, 2017 4:07 pm

That script will work with NetWacht?
 
alisc
Frequent Visitor
Frequent Visitor
Posts: 59
Joined: Thu Dec 01, 2011 10:51 am

Re: Dude Telegram notification example

Tue Sep 12, 2017 9:10 pm

How to call admin number ?
I'm not English
my english not so good , excuse me
 
alisc
Frequent Visitor
Frequent Visitor
Posts: 59
Joined: Thu Dec 01, 2011 10:51 am

Re: Dude Telegram notification example

Tue Sep 19, 2017 7:42 pm

Do you have a solution to call admins when it event?
I'm not English
my english not so good , excuse me
 
User avatar
amt
Long time Member
Long time Member
Posts: 525
Joined: Fri Jan 16, 2015 2:05 pm

Re: Dude Telegram notification example

Wed Sep 20, 2017 12:24 am

That script will work with NetWacht?
Yes.. you can use it at netwatch
 
benjamimgois
Frequent Visitor
Frequent Visitor
Posts: 79
Joined: Fri May 18, 2012 10:36 pm

Re: Dude Telegram notification example

Tue Oct 10, 2017 9:56 pm

I have followed the instructions but it doesn´t work. To see what´s happening i tried the fetch command on the command line but i always receive the following error:
[admin@Dude_x86] > /tool fetch url="https://api.telegram.org/bot<TOKEN_BOT>\?chat_id=348399094&text=HelloWorld!" keep-result=no
  status: failed

failure: closing connection: <502 Bad Gateway> 149.154.167.200:443 (4)
Any ideas ???
--
Telecomunications Engineer
Cisco CCNP, CCNA, CCDP, CCDA
 
Shadeofspirit
Member Candidate
Member Candidate
Posts: 204
Joined: Fri May 27, 2016 12:15 am
Location: Minsk
Contact:

Re: Dude Telegram notification example

Tue Oct 10, 2017 10:03 pm

I have followed the instructions but it doesn´t work. To see what´s happening i tried the fetch command on the command line but i always receive the following error:
[admin@Dude_x86] > /tool fetch url="https://api.telegram.org/bot<TOKEN_BOT>\?chat_id=348399094&text=HelloWorld!" keep-result=no
  status: failed

failure: closing connection: <502 Bad Gateway> 149.154.167.200:443 (4)
Any ideas ???
it looks like you had made a mistake in token)
MTCNA, MTCWE
 
Shadeofspirit
Member Candidate
Member Candidate
Posts: 204
Joined: Fri May 27, 2016 12:15 am
Location: Minsk
Contact:

Re: Dude Telegram notification example

Tue Oct 10, 2017 10:07 pm

I have followed the instructions but it doesn´t work. To see what´s happening i tried the fetch command on the command line but i always receive the following error:
[admin@Dude_x86] > /tool fetch url="https://api.telegram.org/bot<TOKEN_BOT>\?chat_id=348399094&text=HelloWorld!" keep-result=no
  status: failed

failure: closing connection: <502 Bad Gateway> 149.154.167.200:443 (4)
Any ideas ???
the command to send is:
/tool fetch url="https://api.telegram.org/botXXXXX:YYYYY ... text=Hello World" keep-result=no
where XXXXX is your bot id
YYYYY bot token
ZZZZZ chat id
MTCNA, MTCWE
 
benjamimgois
Frequent Visitor
Frequent Visitor
Posts: 79
Joined: Fri May 18, 2012 10:36 pm

Re: Dude Telegram notification example

Tue Oct 10, 2017 10:50 pm

the command to send is:
/tool fetch url="https://api.telegram.org/botXXXXX:YYYYY ... text=Hello World" keep-result=no
where XXXXX is your bot id
YYYYY bot token
ZZZZZ chat id
Sorry man, i didn´t write it right on the last post, but that´s exactly what i typed... I was calling token the entire <BOT_ID>:<BOT_TOKEN> ... my mistake. I created the bot using botfather and followed the tutorial, i still got the 502 bad gateway error.
/tool fetch url="https://api.telegram.org/bot<BOT_ID>:<BOT_TOKEN>\?chat_id=348399094&text=Hello World !" keep-result=no
What am i doing wrong ?
--
Telecomunications Engineer
Cisco CCNP, CCNA, CCDP, CCDA
 
Shadeofspirit
Member Candidate
Member Candidate
Posts: 204
Joined: Fri May 27, 2016 12:15 am
Location: Minsk
Contact:

Re: Dude Telegram notification example

Tue Oct 10, 2017 10:54 pm

the command to send is:
/tool fetch url="https://api.telegram.org/botXXXXX:YYYYY ... text=Hello World" keep-result=no
where XXXXX is your bot id
YYYYY bot token
ZZZZZ chat id
Sorry man, i didn´t write it right on the last post, but that´s exactly what i typed... I was calling token the entire <BOT_ID>:<BOT_TOKEN> ... my mistake. I created the bot using botfather and followed the tutorial, i still got the 502 bad gateway error.
/tool fetch url="https://api.telegram.org/bot<BOT_ID>:<BOT_TOKEN>\?chat_id=348399094&text=Hello World !" keep-result=no
What am i doing wrong ?
first of all:
/sendMessage? before chat_id
the second is, that you can use it in script (create test scrip with only command to send message), because from command line on mikrotik it wouldn't work
MTCNA, MTCWE
 
benjamimgois
Frequent Visitor
Frequent Visitor
Posts: 79
Joined: Fri May 18, 2012 10:36 pm

Re: Dude Telegram notification example

Wed Oct 11, 2017 2:49 pm

first of all:
/sendMessage? before chat_id
the second is, that you can use it in script (create test scrip with only command to send message), because from command line on mikrotik it wouldn't work
So the line should look like this ?
/tool fetch url="https://api.telegram.org/bot<BOT_ID>:<BOT_TOKEN>/sendMessage?=Hello World\?chat_id=348399094" keep-result=no
--
Telecomunications Engineer
Cisco CCNP, CCNA, CCDP, CCDA
 
Shadeofspirit
Member Candidate
Member Candidate
Posts: 204
Joined: Fri May 27, 2016 12:15 am
Location: Minsk
Contact:

Re: Dude Telegram notification example

Wed Oct 11, 2017 2:58 pm

first of all:
/sendMessage? before chat_id
the second is, that you can use it in script (create test scrip with only command to send message), because from command line on mikrotik it wouldn't work
So the line should look like this ?
/tool fetch url="https://api.telegram.org/bot<BOT_ID>:<BOT_TOKEN>/sendMessage?=Hello World\?chat_id=348399094" keep-result=no
no, as i had posted:
/tool fetch url="https://api.telegram.org/botXXXXX:YYYYY/sendMessage?chat_id=ZZZZZ&text=Hello World" keep-result=no
MTCNA, MTCWE
 
benjamimgois
Frequent Visitor
Frequent Visitor
Posts: 79
Joined: Fri May 18, 2012 10:36 pm

Re: Dude Telegram notification example

Wed Oct 11, 2017 4:55 pm

first of all:
/sendMessage? before chat_id
the second is, that you can use it in script (create test scrip with only command to send message), because from command line on mikrotik it wouldn't work
So the line should look like this ?
/tool fetch url="https://api.telegram.org/bot<BOT_ID>:<BOT_TOKEN>/sendMessage?=Hello World\?chat_id=348399094" keep-result=no
no, as i had posted:
/tool fetch url="https://api.telegram.org/botXXXXX:YYYYY/sendMessage?chat_id=ZZZZZ&text=Hello World" keep-result=no
Well, i tried as you said and now i receive a 404 not found error message. Now i´m posting my bot ID and TOKEN.
[admin@Dude_x86] > /tool fetch url="https://api.telegram.org/bot<BOT_ID>:<BOT_TOKEN=Hello World" keep-result=no
  status: failed

failure: closing connection: <404 Not Found> 149.154.167.198:443 (4)
When i type the URL https://api.telegram.org/bot<BOT_ID>:<BOT_TOKEN/getme on the browser followed by the "getme " i got the following statement
{"ok":true,"result":{"id":BOT_ID,"is_bot":true,"first_name":"xxxx","username":"xxxxxxx"}}
What am i missing here ?
Last edited by benjamimgois on Wed Oct 11, 2017 6:14 pm, edited 1 time in total.
--
Telecomunications Engineer
Cisco CCNP, CCNA, CCDP, CCDA
 
Shadeofspirit
Member Candidate
Member Candidate
Posts: 204
Joined: Fri May 27, 2016 12:15 am
Location: Minsk
Contact:

Re: Dude Telegram notification example

Wed Oct 11, 2017 5:17 pm


What am i missing here ?
Please, write there if you get message in telegram.
If you get - all is correct in your config.
read my previous message - this command can be used in script, but not in command line
MTCNA, MTCWE
 
benjamimgois
Frequent Visitor
Frequent Visitor
Posts: 79
Joined: Fri May 18, 2012 10:36 pm

Re: Dude Telegram notification example

Wed Oct 11, 2017 5:29 pm


What am i missing here ?
Please, write there if you get message in telegram.
If you get - all is correct in your config.
read my previous message - this command can be used in script, but not in command line
Shadeofspirit, i receive your message. Thanks for the help man, i´ll try it on a script as you said.

I worked !!! Thanks for the help Shade !
Last edited by benjamimgois on Wed Oct 11, 2017 6:12 pm, edited 1 time in total.
--
Telecomunications Engineer
Cisco CCNP, CCNA, CCDP, CCDA
 
Shadeofspirit
Member Candidate
Member Candidate
Posts: 204
Joined: Fri May 27, 2016 12:15 am
Location: Minsk
Contact:

Re: Dude Telegram notification example

Wed Oct 11, 2017 5:34 pm


Shadeofspirit, i receive your message. Thanks for the help man, i´ll try it on a script as you said.
if you want, i can send you script that i used for sending message by skype, telegram, viber, e-mail
and i suggest you to delete your message on forum with your bot token
MTCNA, MTCWE
 
benjamimgois
Frequent Visitor
Frequent Visitor
Posts: 79
Joined: Fri May 18, 2012 10:36 pm

Re: Dude Telegram notification example

Wed Oct 11, 2017 6:15 pm


Shadeofspirit, i receive your message. Thanks for the help man, i´ll try it on a script as you said.
if you want, i can send you script that i used for sending message by skype, telegram, viber, e-mail
and i suggest you to delete your message on forum with your bot token
Yes, could you send me please ? you can post it here on the forum or by gmail if you prefer

benjamim.gois@gmail.com
--
Telecomunications Engineer
Cisco CCNP, CCNA, CCDP, CCDA
 
icecybe
just joined
Posts: 23
Joined: Thu Nov 26, 2009 1:13 am

Re: Dude Telegram notification example

Tue Oct 24, 2017 1:45 pm

Hi hi, team.
I'm stuck on same problem, or similar to this one.
When i test dude notification all working ok, but when some switch in dude lost , the chat bot is silent.
And i dont know where can be the mistake, because all is working but bot in the chat sleeping :)
Any information needed ?
 
Shadeofspirit
Member Candidate
Member Candidate
Posts: 204
Joined: Fri May 27, 2016 12:15 am
Location: Minsk
Contact:

Re: Dude Telegram notification example

Tue Oct 24, 2017 2:00 pm

Hi hi, team.
I'm stuck on same problem, or similar to this one.
When i test dude notification all working ok, but when some switch in dude lost , the chat bot is silent.
And i dont know where can be the mistake, because all is working but bot in the chat sleeping :)
Any information needed ?
did you select this type of notification for this device?
MTCNA, MTCWE
 
icecybe
just joined
Posts: 23
Joined: Thu Nov 26, 2009 1:13 am

Re: Dude Telegram notification example

Tue Oct 24, 2017 2:37 pm

You mean in : Notification > Advanced tab ? Yes click them all. Is there anywhere else i can check them ?
 
icecybe
just joined
Posts: 23
Joined: Thu Nov 26, 2009 1:13 am

Re: Dude Telegram notification example

Tue Oct 24, 2017 2:39 pm

/tool fetch url="https://api.telegram.org/botxxxxxxxxx:y ... 1212&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
 
Shadeofspirit
Member Candidate
Member Candidate
Posts: 204
Joined: Fri May 27, 2016 12:15 am
Location: Minsk
Contact:

Re: Dude Telegram notification example

Tue Oct 24, 2017 2:56 pm

/tool fetch url="https://api.telegram.org/botxxxxxxxxx:y ... 1212&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'
MTCNA, MTCWE
 
icecybe
just joined
Posts: 23
Joined: Thu Nov 26, 2009 1:13 am

Re: Dude Telegram notification example

Tue Oct 24, 2017 3:18 pm

Damn Dude !!! You are a genious.
Thank's a lot for this small but HUGE help. It work's
 
tangram
Member Candidate
Member Candidate
Posts: 131
Joined: Wed Nov 16, 2016 9:55 pm

Re: Dude Telegram notification example

Sun Mar 04, 2018 9:55 am

Why does the ? disappear when you paste in terminal ?

/tool fetch "https://api.telegram.org/botblablabla/s ... thissatest" keep-result=no
turns to /tool fetch "https://api.telegram.org/botblablabla/s ... 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.
 
Bc234
just joined
Posts: 1
Joined: Fri May 11, 2018 11:45 pm

Re: Dude Telegram notification example

Sun May 13, 2018 10:10 pm

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

 
User avatar
blackhold
just joined
Posts: 11
Joined: Tue Apr 15, 2014 3:12 am
Location: Catalonia
Contact:

Re: Dude Telegram notification example

Mon May 14, 2018 9:29 pm

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

https://wiki.mikrotik.com/wiki/Manual:T ... am_Example

the correct example would be

/tool fetch url="https://api.telegram.org/bot309683994:A ... pleMessage" keep-result=no

instead of:

/tool fetch url="https://api.telegram.org/bot309683994:A ... pleMessage" keep-result=no

you have to add "-" sign before chat_id number.
 
jessequijano
newbie
Posts: 28
Joined: Sat Nov 13, 2010 10:14 pm

Re: Dude Telegram notification example

Sat Jun 09, 2018 3:38 am

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.
 
vitorbessa
just joined
Posts: 1
Joined: Mon Sep 24, 2018 1:55 am

Re: Dude Telegram notification example

Mon Sep 24, 2018 2:01 am

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

Forgive me for my English.

Who is online

Users browsing this forum: No registered users and 3 guests