Answer the question
In order to leave comments, you need to log in
The Dude. How to send notifications in Telegram?
I created my own bot and channel in Telegram. I learned how to send notifications from RouterOS to the created channel. But I still don’t understand how to configure The Dude monitoring server to send notifications .. ((
I suppose that you need to use a command like:
ros_command("/tool fetch url="https://api.telegram.org/bot........
Answer the question
In order to leave comments, you need to log in
Вопрос давно решился, но забыл отписаться вовремя. Работает следующий вариант нотификации в дуде (Type: execute on server):
/tool fetch url="https://api.telegram.org/botXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXX/sendMessage?chat_id=-10XXXXXXXXXXXXX&parse_mode=HTML&text=at <b>[TimeAndDate]</b> %0A\
on map <b>[Device.NetMaps]</b> %0A\
Device IP <b>[Device.Name]</b> %0A\
Probe <b>[Probe.Name]</b> %0A\
Status <b>[Service.Status]</b> %0A\
Problem Description: <b>[Service.ProblemDescription]</b> %0A\
Changed since <b>[Service.TimeSinceChanged]</b> %0A\
Last time up <b>[Service.TimeLastUp]</b> \
" keep-result=no
Обратите внимание, что если отправлять сообщение с RouterOS так:
/tool fetch url="https://api.telegram.org/botXXXXXXXXXXXXXXXXXX/sendMessage?
chat_id=-XXXXXX&text=Your text"
то после каждой отправки сообщения в ФС устройства будет загружаться файл.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question