Hey All,This is a simple script u can schedule it every while of time to detect your Ethernet port rate status
And to report u the situation of it by your Telegram Group
Look also at http://forum.mikrotik.com/t/basic-notifications-system-with-telegram/122485/1
1- To Detect if there is 10Mbps Ethernet Rate
#Edit Here Only Identify Telegram Values
:local server ([/system identity get name])
:local botid "XXXXXXXX"
:local chatid "-XXXXXXX"
#Start Monitoring of All Ethernet Ports
/interface ethernet monitor [find] once do={
:if ($"rate" = "10Mbps") do={
/tool fetch "https://api.telegram.org/$botid/sendmessage?chat_id=$chatid&text=$server%0APort $name Rate is $rate" keep-result=no;};
}
Now if u have a 1Gpbs Ethernet u wish to keep monitoring it,Use this method
#Edit Here to Identify Telegram Values
:local server ([/system identity get name])
:local botid "XXXXXXXX"
:local chatid "-XXXXXXX"
#Start Monitoring of All Ethernet Ports
#Edit The X to the desired Ethernet port Name
/interface ethernet monitor [find name=X] once do={
:if ($"rate" != "1Gbps") do={
/tool fetch "https://api.telegram.org/$botid/sendmessage?chat_id=$chatid&text=$server%0APort $name Rate is $rate" keep-result=no;};
}
I wish it could help u ![]()
Many thanks for this guy who guide me to the right way to complete it https://forum.mikrotik.com/memberlist.php?mode=viewprofile&u=97351
Ahmed Mouselly
Regards.