script notifikasi telegram profile radius di mikrotik
{
:local bot "xxxxxx:xxxxxxxxxxxxxxxx";
:local chat "-xxxxxxxx";
:local uname $user;
:local remoteIP $"remote-address";
:local caller $"caller-id";
:local called $"called-id";
:local iface $interface;
:local waktu ([/system clock get time] . " " . [/system clock get date]);
:local message ("<b>\E2\9C\85 PPPoE CONNECT</b>%0A%0A" . \
"<b>User</b>: <code>" . $uname . "</code>%0A" . \
"<b>Caller-ID</b>: <code>" . $caller . "</code>%0A" . \
"<b>Called-ID</b>: <code>" . $called . "</code>%0A" . \
"<b>remote-IP</b>: <code>" . $remoteIP . "</code>%0A" . \
"<b>Waktu</b>: <code>" . $waktu . "</code>%0A");
/tool fetch url=("https://api.telegram.org/bot" . $bot . "/sendMessage?parse_mode=html&chat_id=" . $chat . "&text=" . $message) mode=https keep-result=no;
}
{
:local bot "xxxxxx:xxxxxxxxxxxxxxxx";
:local chat "-xxxxxxxx";
:local uname $user;
:local remoteIP $"remote-address";
:local caller $"caller-id";
:local called $"called-id";
:local iface $interface;
:local waktu ([/system clock get time] . " " . [/system clock get date]);
:local message ("<b>\E2\9D\8C PPPoE DISCONNECT</b>%0A%0A" . \
"<b>User</b>: <code>" . $uname . "</code>%0A" . \
"<b>Caller-ID</b>: <code>" . $caller . "</code>%0A" . \
"<b>Called-ID</b>: <code>" . $called . "</code>%0A" . \
"<b>remote-IP</b>: <code>" . $remoteIP . "</code>%0A" . \
"<b>Waktu</b>: <code>" . $waktu . "</code>%0A");
/tool fetch url=("https://api.telegram.org/bot" . $bot . "/sendMessage?parse_mode=html&chat_id=" . $chat . "&text=" . $message) mode=https keep-result=no;
}
Komentar
Posting Komentar