From Input

Fill in according to User Profil PPPoE


Please enter BOOT, ID & PROFILE, Mikrotik PPPoE profile



please leave a comment if an error occurs in the script

Output Script

Copy the script in the pppoe profile


On Up
--------------------------
:local nama "$user";
:local bot "{{bot}}";
:local chat "{{id}}";
: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 fup [/ppp secret get [find name=$nama] profile];
:local last [/ppp secret get [find name=$user] last];
:local active [/ppp active print count];
:local secret [/ppp secret print count];
:local off ($secret - $active);
/tool fetch url="https://api.telegram.org/bot$bot/sendMessage?chat_id=$chat &text=\E2\9C\85 ROUTER CONNECTED %0AUser: $user%0AIP Client: $ips%0ACaller ID: $caller %0AService: $service%0AUptime: $up%0APaket: $fup%0ALast Logout: $last%0ATotal PPPoE Active: $active Client" mode=http keep-result=no;

--------------------------
On Down
--------------------------
:local nama "$user";
:local bot "{{bot}}";
:local chat "{{id}}";
:local service [/ppp secret get [find name=$nama] service];
:local local [/ppp secret get [find name=$nama] local];
:local remote [/ppp secret get [find name=$nama] remote];
:local profile [/ppp secret get [find name=$nama] profile];
:local last [/ppp secret get [find name=$nama] last];
/tool fetch url="https://api.telegram.org/bot$bot/sendMessage?chat_id=$chat&text=\E2\9D\8C ROUTER DISCONNECTED%0AUser: $user%0AService: $service %0ALocal Address: $local%0ARemote Address: $remote%0AProfile: $profile%0ALast Logout: $last%0A" mode=http keep-result=no;
Copyright © ahmadydev.github.io 2021 Free article about mikrotik Balehotspot.id