Today i’ll show you a little script for RouterOS to check if queue tree exceed the limit you set.
For. Example i’ve a queue tree that limit the amount o total traffic(Upload+Download) to 50MBps
I want to know whenever this queue exceed the limit, and i want the system to send me an email.
This is the script:
I’ll explain the code:
First i define a variable checkrate that represent the instant rate of the queue tree named total-traffic then i define a limit(this case i’ve used 50Mbps) then i check if rate less than limit do nothing or just log to test the script.
If checkrate greater than limit send an email to myself.
Be sure to specify as email server an IP address and not the name of the server(ex. mail.myself.com)