/newbot
MT-Sender
MikrotikConfigUkr_bot
/start
https://api.telegram.org/bot1434763164:AAF4rlEsDiAu0l7mJKXIMfNzT-zV2Qc3CbQ/getUpdates
{"ok":true,"result":[{"update_id":34080233,
"channel_post":{"message_id":2,"sender_chat":{"id":-1001186561350,"title":"MT-Status","type":"channel"},"chat":{"id":-1001186561350,"title":"MT-Status","type":"channel"},"date":1607945201,"text":"/start","entities":[{"offset":0,"length":6,"type":"bot_command"}]}}]}
/tool fetch url="https://api.telegram.org/bot1434763164:AAF4rlEsDiAu0l7mJKXIMfNzT-zV2Qc3CbQ/sendMessage\?chat_id=-1001186561350&text=Mikrotik-Config.ukr testing telegram bot" dst-path=Log.txt
/tool netwatch
add disabled=yes down-script="/ip route disable [find comment=\"ISP-1\"]\r\
\n/ip route enable [find comment=\"ISP-2\"]\r\
\n:foreach i in=[/ip firewall connection find protocol~\"tcp\"] do={ /ip f\
irewall connection remove \$i }\r\
\n:foreach i in=[/ip firewall connection find protocol~\"udp\"] do={ /ip f\
irewall connection remove \$i }\r\
\n/tool fetch url=\"https://api.telegram.org/bot1434763164:AAF4rlEsDiAu0l7\
mJKXIMfNzT-zV2Qc3CbQ/sendMessage\\\?chat_id=-1001186561350&text=ISP-1 IS D\
OWN\" dst-path=Log.txt\r\
\nlog warning (\"ISP-1 IS DOWN\")" host=8.8.8.8 interval=30s up-script="/i\
p route disable [find comment=\"ISP-2\"]\r\
\n/ip route enable [find comment=\"ISP-1\"]\r\
\n:foreach i in=[/ip firewall connection find protocol~\"tcp\"] do={ /ip f\
irewall connection remove \$i }\r\
\n:foreach i in=[/ip firewall connection find protocol~\"udp\"] do={ /ip f\
irewall connection remove \$i }\r\
\n/tool fetch url=\"https://api.telegram.org/bot1434763164:AAF4rlEsDiAu0l7\
mJKXIMfNzT-zV2Qc3CbQ/sendMessage\\\?chat_id=-1001186561350&text=ISP-1 IS U\
P\" dst-path=Log.txt\r\
\nlog warning (\"ISP-1 IS UP\")"