Cara Monitoring IP Service Status dan Port Menggunakan RouterOS via Telegram




















:local CHID "636259541";
:local BotID "1032986435:AAHKpiAqlEoaA1ntvWXXsN46s0MH9YYOiFk";

:local Identitas ("*Nama Identitas Router:* ".[/system identity get name]."%0A")
:local Nama0 ("*Nama Service:* ".[/ip service get 0 name]."%0A")
:local Nama1 ("*Nama Service:* ".[/ip service get 1 name]."%0A")
:local Nama2 ("*Nama Service:* ".[/ip service get 2 name]."%0A")
:local Nama3 ("*Nama Service:* ".[/ip service get 3 name]."%0A")
:local Nama4 ("*Nama Service:* ".[/ip service get 4 name]."%0A")
:local Nama5 ("*Nama Service:* ".[/ip service get 5 name]."%0A")


:local telnetport ("*Port Telnet:* ".[/ip service get 0 value-name="port"]."%0A")
:local ftpport ("*Port FTP:* ".[/ip service get 1 value-name="port"]."%0A")
:local wwwport ("*Port WWW:* ".[/ip service get 2 value-name="port"]."%0A")
:local sshport ("*Port SSH:* ".[/ip service get 3 value-name="port"]."%0A")
:local sslport ("*Port SSL:* ".[/ip service get 4 value-name="port"]."%0A")
:local apiport ("*Port API:* ".[/ip service get 5 value-name="port"]."%0A")


:local statustelnet ("*Status Port Telnet:* ".[/ip service get 0 value-name="disable"]."%0A")
:local statusftpport ("*Status Port FTP:* ".[/ip service get 1 value-name="disable"]."%0A")
:local statuswwwport ("*Stats Port WWW:* ".[/ip service get 2 value-name="disable"]."%0A")
:local statussshport ("*Status Port SSH:* ".[/ip service get 3 value-name="disable"]."%0A")
:local statussslport ("*Status Port SSL:* ".[/ip service get 4 value-name="disable"]."%0A")
:local statusapiport ("*Status Port API:* ".[/ip service get 5 value-name="disable"]."%0A")


/tool fetch url="https://api.telegram.org/bot$BotID/sendmessage\?chat_id=$CHID&text=$Identitas $Nama0 $telnetport $statustelnet $Nama1 $ftpport $statusftpport $Nama2 $wwwport $statuswwwport $Nama3 $sshport $statussshport $Nama4 $sslport $statussslport $Nama5 $apiport $statusapiport ";
:delay 10
/file remove [/file find type="file"];


Semoga Bermanfaat
Penulis : Een Pahlefi,S.Kom

0 Response to "Cara Monitoring IP Service Status dan Port Menggunakan RouterOS via Telegram"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel