REPORT CONNECTION USING TELEGRAM ON MIKROTIK ROUTER

i want to share telegram script to sending information about an IP address status.
this script function to give u alert when IP address is UP or Down.


2. Open your mikrotik and check on netwatch
 - tool -> netwatch

 - click + icon


 - on tab host set host with IP address your host in example 192.168.11.67, interval 00:00:10 meaning 10 second if host not reply netwatch status set host DOWN.



 3. Inserting script 

- Get your bot API with sending message to BotFather with command /revoke
 and choose your bot.

 - Get your telegram id with sending message to @userinfobot

 send command /start



- Insert script on tab UP 
example script on tab UP : /tool fetch url="https://api.telegram.org/bot(your bot API)/sendmessage?chat_id=(your telegram ID)&text=info : your host IS UP ping from [$host] " keep-result=no 

 - Insert scritp on tab DOWN
 example script:  /tool fetch url="https://api.telegram.org/bot(your bot API)/sendmessage?chat_id=(your telegram ID)&text=info : your host IS DOWN ping from [$host] " keep-result=no

4. Send message to your bot to start session with your bot

and this is example when your bot is ready to work

No comments