Thursday, April 4, 2024
Mikrotik Netwach Telegram

Monitoring Server,router dan switch dengan Netwach pada mikrotik – Alert via bot Telegram

bot

Pada Kesempatan kali ini saya akan membahas mengenai Monitoring Server,router dan switch dengan Netwach pada mikrotik – Alert via bot Telegram. Yuk langsung saja kita mulai pembahasan nya.

Requairment yg di butuhkan :

  1. Bot Telegram
  2. 1 Buah RB mikrotik
  • Buat dahulu bot telegram nya
- Masuk ke telegram lalu cari @BotFather
- lalu ketik /start
- ketik /newbot
- misal saya di sini memberi nama bot linuxbot
- nanti hasilnya misal

Done! Congratulations on your new bot. You will find it at t.me/yuby_linux_bot. You can now add a description, about section and profile picture for your bot, see /help for a list of commands. By the way, when you've finished creating your cool bot, ping our Bot Support if you want a better username for it. Just make sure the bot is fully operational before you do this.

Use this token to access the HTTP API:
1380355350:AAF6t7WzOHRSFqvJNJEGicKCrpihJQxxxxx
Keep your token secure and store it safely, it can be used by anyone to control your bot.

For a description of the Bot API, see this page: https://core.telegram.org/bots/api

- jangan lupa simpan token nya
- Undang bot yang telah dibuat ke sebuah group untuk memonitoring notifikasi dari netwatch
- selanjutnya kita harus mengetahui chat id bot kita
- open di web browser
format :
https://api.telegram.org/bot(Bot_http_API_token)/getUpdates
Jadi
https://api.telegram.org/bot1380355350:AAF6t7WzOHRSFqvJNJEGicKCrpihJQxxxx/getUpdates

misal diketahui : chat id nya 129862574

- test bot
https://api.telegram.org/bot1380355350:AAF6t7WzOHRSFqvJNJEGicKCrpihJQFHXAI/sendmessage?chat_id=129862574&text=ko%20ga%20masuk
- nanti akan ada pesan masuk ke bot tersebut
  • Masuk Ke RB mikrotik -> Pilih Tools -> Pilih Netwach
- Add New Netwach
Host : 175.176.161.xxx (IP server / Router yang mau di monitoring)
Interval : 1 menit
timeout : 1000 ms
- Klik tab UP

tool fetch url="https://api.telegram.org/bot1380355350:AAF6t7WzOHRSFqvJNJEGicKCrpihJQFHXAI/sendmessage\?chat_id=129862574&text=LINK_KE_SMTP_Up-175.176.161.xxx" keep-result=no;

- Klik Tab Down

tool fetch url="https://api.telegram.org/bot1380355350:AAF6t7WzOHRSFqvJNJEGicKCrpihJQFHXAI/sendmessage\?chat_id=129862574&text=LINK_KE_SMTP_Down-175.176.161.xxx"  keep-result=no 

-NB :
175.176.161.xxx -> IP server
bot1380355350:AAF6t7WzOHRSFqvJNJEGicKCrpihJQFHXAI -> Token Bot
129862574 -> Chat ID Bot
  • Nanti hasil nya
Baca Juga :  Cara Limit Bandwidth Mikrotik Otomatis

Jika server / router Down dan UP akan mengirim alert ke bot tersebut .

  • Dengan begini kita bisa lebih mudah untuk memonitoring jaringan ataupun server

Sumber :

http://www.mikrotik.co.id/artikel_lihat.php?id=401
https://netkromsolution.com/2019/05/29/membuat-bot-telegram-untuk-monitoring-jaringan/
(Visited 653 times, 1 visits today)

Similar Posts