Cara Monitoring User PPPOE Menggunakan RouterOS via Telegram




















:local CHID "-38169xxxx";
:local BotID "103298xxxx:AAHKpiAqlEoaA1ntvWXXsN46s0MH9YYOiFk";

:local Total [/ppp active print count];

:local output
:foreach activeIndex in=[/ppp active find] do={
:local Informasi "User Active PPP %0A";
:local name ("*Nama User:* ".[/ppp active get value-name="name" $activeIndex]."%0A")
:local address ("*Alamat IP Address:* ".[/ppp active get value-name="address" $activeIndex]."%0A")
:local Mac ("*Caller ID atau MAC Address:* ".[/ppp active get value-name="caller-id" $activeIndex]."%0A")
:local Hidup ("*Uptime:* ".[/ppp active get value-name="uptime" $activeIndex]."%0A")
:local Tipe ("*Tipe Service:* ".[/ppp active get value-name="service" $activeIndex]."%0A")


:set output ($output.$Informasi.$name.$address.$Mac.$Hidup.$Tipe."%0A")
}

/tool fetch url="https://api.telegram.org/bot$BotID/sendmessage\?chat_id=$CHID&text=$output Total Seluruh Yang Aktif: $Total";
:delay 10
/file remove [/file find type="file"];

alternatif yang baru

-----on up 
:local nama "$user";
:local bot "5107387541:AAE-dv_yHjKDcQ";
:local chat "-7601";
:local ips [/ppp active get [find name=$nama] address];
:local up [/ppp active get [find name=$nama] uptime];
:local caller [/ppp active get [find name=$nama] caller-id];
:local service [/ppp active get [find name=$nama] service];
:local active [/ppp active print count];
:local datetime "Tanggal: $[/system clock get date] %0AJam: $[/system clock get time]";
:local lastdisc [/ppp secret get [find name=$user] last-disconnect-reason];
:local lastlogout [/ppp secret get [find name=$user] last-logged-out];
:local lastcall [/ppp secret get [find name=$user] last-caller-id];
/tool fetch url="https://api.telegram.org/bot$bot/sendMessage?chat_id=$chat &text=\E2\9C\85 LOGIN%0A$datetime%0AUser: $user%0AIP Client: $ips%0ACaller ID: $caller%0AUptime: $up%0ATotal Active: $active Client%0AService: $service%0ALast Disconnect Reason: $lastdisc %0ALast Logout: $lastlogout %0ALast Caller ID: $lastcall" mode=http keep-result=no;


----on down

:local nama "$user";
:local bot "5107387541:AAE-";
:local chat "-7601";
:local lastdisc [/ppp secret get [find name=$user] last-disconnect-reason];
:local active [/ppp active print count];
:local datetime "Tanggal: $[/system clock get date] %0AJam: $[/system clock get time]";
:local active [/ppp active print count];
/tool fetch url="https://api.telegram.org/bot$bot/sendmessage\?chat_id=$chat&text=\E2\9D\8C Client: $user%0A$datetime%0ATotal Active: $active Clien" keep-result=no;




















Semoga Bermanfaat
Penulis : Een Pahlefi,S.Kom

0 Response to "Cara Monitoring User PPPOE Menggunakan RouterOS via Telegram"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel