Community discussions

MikroTik App
 
joker007
just joined
Topic Author
Posts: 3
Joined: Mon Sep 21, 2020 4:31 pm

ASK Notif Telegram For Route list

Thu Sep 24, 2020 2:18 pm

hi, i have question, i run microtik fail over with Recursive Gateway, i want make notif to telegram if internet move to ISP 1 or ISP 2, this possible ?
i just want monitor route move to ISP 1 or 2

thanks
 
User avatar
Mizm
just joined
Posts: 4
Joined: Sun Jul 14, 2019 5:45 pm

Re: ASK Notif Telegram For Route list

Thu Sep 24, 2020 6:33 pm

possible with /fetch cli command:
/tool fetch mode=https url="https://api.telegram.org/bot{BOT_TOKEN}/sendMessage"  http-method=post  http-data="chat_id={CHANNEL_ID}&text={MESSAGE_STRING}"
example with fake data:
/tool fetch mode=https url="https://api.telegram.org/bot100622605:BHr9g4G5g4509gkiF4Mvf/sendMessage"  http-method=post  http-data="chat_id=-863123123&text=Test message"
you will need to :
1. create telegram bot (via BotFather), more info: https://core.telegram.org/bots
2. add your bot to some private channel/group so it can spam there
3. then, to find out chat ID, you can query https://api.telegram.org/bot{BOT_TOKEN}/getUpdates