0% found this document useful (0 votes)
89 views

Scrip

This document contains code to log PPPoE connection information and send a notification via Telegram. It retrieves the last disconnect reason, last logout time, last caller ID, current date and time, total active connections and sends this data in a message to a Telegram chat ID via the Telegram Bot API. It also writes the same information to the log for debugging purposes.

Uploaded by

Anggi Amanda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
89 views

Scrip

This document contains code to log PPPoE connection information and send a notification via Telegram. It retrieves the last disconnect reason, last logout time, last caller ID, current date and time, total active connections and sends this data in a message to a Telegram chat ID via the Telegram Bot API. It also writes the same information to the log for debugging purposes.

Uploaded by

Anggi Amanda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

:local bot "5679554246:AAEcBieajTgqP_7DrwRGf5MLlCjuseCXhpU";

:local chat "1344182808";


:local lastlogout [/ppp secret get [find name=$user] last-logged-out];
:local lastcall [/ppp secret get [find name=$user] last-caller-id];
:local active [/ppp active print count];
:local datetime "Tanggal: $[/system clock get date] %0AJam: $[/system clock get
time]";
/tool fetch url="https://api.telegram.org/bot$bot/sendmessage?chat_id=$chat&text=\
E2\9D\8CPPPOE-LOGOUT %0A$datetime%0AUSER: $user%0ALast Disconnect Reason: $lastdisc
%0ALast Logout: $lastlogout %0ALast Caller ID: $lastcall %0ATotal active: $active
Client" keep-result=no;
:log warning "$datetime%0AUSER: $user%0ALast Disconnect Reason: $lastdisc %0ALast
Logout: $lastlogout %0ALast Caller ID: $lastcall %0ATotal active: $active Client";

:local bot "5679554246:AAEcBieajTgqP_7DrwRGf5MLlCjuseCXhpU";


:local chat "1344182808";
: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];
:local active [/ppp active print count];
:local datetime "Tanggal: $[/system clock get date] %0AJam: $[/system clock get
time]";
/tool fetch url="https://api.telegram.org/bot$bot/sendmessage?chat_id=$chat&text=\
E2\9D\8CPPPOE-LOGOUT %0A$datetime%0AUSER: $user%0ALast Disconnect Reason: $lastdisc
%0ALast Logout: $lastlogout %0ALast Caller ID: $lastcall %0ATotal active: $active
Client" keep-result=no;
:log warning "$datetime%0AUSER: $user%0ALast Disconnect Reason: $lastdisc %0ALast
Logout: $lastlogout %0ALast Caller ID: $lastcall %0ATotal active: $active Client";

You might also like