162. Mikrotik How to Config Alert by Telegram


You can contact me: plus.google.com/+PhallaCCMT; youtube.com/phallaccmt; facebook.com/Phalla.CCMT; twitter.com/PhallaCCMT and Phalla.CCMT@gmail.com


Steps:

1. Go to Telegram App/Web: search for "BotFather"
2. Enter "/newbot"
3. Enter our Bot Account name that must end with "Bot or _bot" then you will get token to access HTTPS API.
Ex: 674410326:AAHdIexPzAkY-Qygj7SZ-pJKwb3HGzjt9fo

4. Open Browser with this link by replace with our bot ID to make sure it work or not:
Ex: 
     https://api.telegram.org/bot123456:ABC-DEF1234ghIkl-  zyx57W2v1u123ew11/getMe 
     to 
     https://api.telegram.org/bot674410326:AAHdIexPzAkY-Qygj7SZ-pJKwb3HGzjt9fo/getMe

5. Go to Telegram then Create a group.
6. Enter "/jion @[botname]"
Ex: /jion @phallaccmtBot

7. Find Account ID:
https://api.telegram.org/bot674410326:AAHdIexPzAkY-Qygj7SZ-pJKwb3HGzjt9fo/getupdates
-------------------------------------------------------------
"{"ok":true,"result":[{"update_id":421982068,
"message":{"message_id":1,"from":{"id":292302472,"is_bot":false,"first_name":"\u17a0\u17bb\u1784","last_name":"\u1795\u179b\u17d2\u179b\u17b6","username":"Phalla27O"},"chat":{"id":-265243874,"title":"Netwatch_Mikrotik","type":"group","all_members_are_administrators":true},"date":1538022867,"group_chat_created":true}},{"update_id":421982069,
"message":{"message_id":2,"from":{"id":292302472,"is_bot":false,"first_name":"\u17a0\u17bb\u1784","last_name":"\u1795\u179b\u17d2\u179b\u17b6","username":"Phalla27O"},"chat":{"id":-265243874,"title":"Netwatch_Mikrotik","type":"group","all_members_are_administrators":true},"date":1538022915,"text":"/jion @phallaccmtBot","entities":[{"offset":0,"length":5,"type":"bot_command"},{"offset":6,"length":14,"type":"mention"}]}}]}"
-------------------------------------------------------------
8. Replace BotID and Account ID to below script for Netwatch.
NetWatch Script:

:local CurDate [/system clock get date] 
:local CurTime [/system clock get time] 

:local CHID "-265243874"; 
:local BotID "674410326:AAHdIexPzAkY-Qygj7SZ-pJKwb3HGzjt9fo";
:local HostStatus "UP";

:local Message "Host $host is $HostStatus at $CurTime $CurDate";

/tool fetch url="https://api.telegram.org/bot$BotID/sendmessage\?chat_id=$CHID&text=$Message";

Ref: https://wiki.mikrotik.com/wiki/Manual:The_Dude_v6/Dude_Telegram_Example
Previous
Next Post »

6 comments

Write comments
sl67
AUTHOR
September 30, 2018 at 8:00 AM delete

original (on error not keep-result=no)
/tool fetch url="https://api.telegram.org/bot$BotID/sendmessage\?chat_id=$CHID&text=$Message" ;
=====================================
modify no error add keep-result=no
/tool fetch url="https://api.telegram.org/bot$BotID/sendmessage\?chat_id=$CHID&text=$Message" keep-result=no;

Reply
avatar
Kake
AUTHOR
March 29, 2019 at 1:46 AM delete

Script Working perfect but microtik send Notifications in every 6 minutes. What can i do for get notifications only when host getting up or down?

Reply
avatar
Jp Gutierrez
AUTHOR
May 26, 2019 at 8:45 PM delete

Do you have script for login notification of user using telegram?

Reply
avatar
ammar
AUTHOR
May 18, 2020 at 4:36 AM delete

Script Working perfect but microtik send Notifications in every 6 minutes. What can i do for get notifications only when host getting up or down?

Reply
avatar
Anonymous
AUTHOR
July 1, 2020 at 4:00 AM delete

email: visacreditcardsolution@gmail.comGET YOUR BLANK ATM CREDIT CARD AT AFFORDABLE PRICE*
**We sell these cards to all our customers and interested buyers
worldwide,the card has a daily withdrawal limit of $5000 and up to $50,000
spending limit in stores and unlimited on POS.**

**WHAT WE OFFER**

*1)WESTERN UNION TRANSFERS/MONEY GRAM TRANSFER*
*2)BANKS LOGINS*
*3)BANKS TRANSFERS*
*4)CRYPTO CURRENCY MINNING*
*5)BUYING OF GIFT CARDS*
*6)LOADING OF ACCOUNTS*
*7)WALMART TRANSFERS*
*8)BITCOIN INVESTMENTS*
*9)REMOVING OF NAME FROM DEBIT RECORD AND CRIMINAL RECORD*
*10)BANK HACKING*

Reply
avatar
Unknown
AUTHOR
March 11, 2022 at 10:53 AM delete

162. Mikrotik How To Config Alert By Telegram - Phalla Ccmt >>>>> Download Now

>>>>> Download Full

162. Mikrotik How To Config Alert By Telegram - Phalla Ccmt >>>>> Download LINK

>>>>> Download Now

162. Mikrotik How To Config Alert By Telegram - Phalla Ccmt >>>>> Download Full

>>>>> Download LINK

Reply
avatar