The document contains code to send status update messages to Telegram when a server is up or down. It defines variables for the chat ID, bot ID, host name, date, time, and status messages. It then makes API calls to Telegram to send the messages.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
59 views1 page
Script Bot Telegram
The document contains code to send status update messages to Telegram when a server is up or down. It defines variables for the chat ID, bot ID, host name, date, time, and status messages. It then makes API calls to Telegram to send the messages.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1
\\HRSVR01
\\10.10.10.78
Up ==== :local CHID "XXXXXXXXX"; :local BotID "XXXXXXXX:XXXXXXX-XXX-XXX-XXX"; :local HostStatus "Koneksi Server Anda Sudah Kembali Normal";
:local message "Ping $host $HostStatus";
/tool fetch url="https://api.telegram.org/bot$BotID/sendmessage\? chat_id=$CHID&text=$message"; ==== Down ==== :local CHID "XXXXXXXXX"; :local BotID "XXXXXXXX:XXXXXXX_XXX_XXX-XXX"; :local HostStatus "Koneksi Server Anda Sedang Down";
:local message "Ping $host $HostStatus";
/tool fetch url="https://api.telegram.org/bot$BotID/sendmessage\? chat_id=$CHID&text=$message"; ===== ------------------------------------------- Up ============== :local hh $host :local bot "904712554:AXXX" :local chat "59XXX" :local datetime "Tanggal: $[/system clock get date] %0A Jam: $[/system clock get time]" /tool fetch url="https://api.telegram.org/bot$bot/sendmessage\? chat_id=$chat&text=$datetime %0ARouter: $hh ON \E2\9C\85" keep-result=no ============== Down ============== :local hh $host :local bot "904712554:AAXXXX" :local chat "550XX" :local datetime "Tanggal: $[/system clock get date] %0A Jam: $[/system clock get time]" /tool fetch url="https://api.telegram.org/bot$bot/sendmessage\? chat_id=$chat&text=$datetime %0ARouter: $com $hh OFF \E2\9D\8C " keep-result=no