Notifikasi PPPOE Mikrotik Login dan Logout
#pppoe-login
:local id "-554776213";
:local nama "$user";
:local datauser [/ppp active get [find name=$nama] name];
:local dataaddress [/ppp active get [find name=$nama] address];
:local dataservice [/ppp active get [find name=$nama] service];
:local datacallerid [/ppp active get [find name=$nama] caller-id];
:local dataradius [/ppp active get [find name=$nama] radius];
:local totalsemuapppoe [/ppp active print count];
:local datetime "Tanggal:$[/system clock get date]%0AJam:%20$[/system clock get time]";
:local dataidentity "Info Router : $[/system identity get name]";
:local dataversirouteros "Versi RouterOS : $[/system resource get value-name=version]";
:global infohardware "$[/system resource get value-name=board-name]";
:local pesan1 "-----PPPOE Login-----";
:local pesan2 "---------------------";
:local datetime "Tanggal:$[/system clock get date]%0AJam:%20$[/system clock get time]";
/tool fetch url="https://api.telegram.org/bot1568272130:AAEZU0k8usxzFusYVozIfHvS3UUOybKQQck/sendmessage?chat_id=$id&text=$pesan1 %0A $dataidentity %0A $dataversirouteros %0A Perangkat Keras : $infohardware %0A Nama User : $datauser %0A IP Address : $dataaddress %0A Service : $dataservice %0A Caller : $datacallerid %0A Jam Login : $datetime %0A Radius : $dataradius %0A $pesan2 %0A Total Semua PPPOE yang aktif : $totalsemuapppoe di Router ini" keep-result=no
=========================================================================
#pppoe-logout
:local id "-554776213";
:local nama "$user";
:local datauser [/ppp secret get [find name=$nama] name];
:local datapassword [/ppp secret get [find name=$nama] password];
:local datalostlogout [/ppp secret get [find name=$nama] last-logged-out];
:local pesan1 "-----PPPOE Logout-----";
:local pesan2 "---------------------";
:local datetime "Tanggal:$[/system clock get date]%0AJam:%20$[/system clock get time]";
:local dataidentity "Info Router : $[/system identity get name]";
/tool fetch url="https://api.telegram.org/bot1568272130:AAEZU0k8usxzFusYVozIfHvS3UUOybKQQck/sendmessage?chat_id=$id&text=$pesan1 %0A $dataidentity %0A Nama User : $datauser %0A Password : $datapassword %0A Terakhir Logout : $datalostlogout" keep-result=no
Tidak ada komentar untuk "Notifikasi PPPOE Mikrotik Login dan Logout"
Posting Komentar