If traffic is lower than 1Mbps run script

Hello, i m trying make few scripts for my network and i found little problem.

Is there any way to monitor traffic if it is lower than 1Mbps? For example if traffic from ether2 is for example 512kbps run script.

I tried traffic-monitor but it will run script only if traffic peak 1Mbps. Is there any elegant way to do it?

Thanks :slight_smile:

I found how done it

/interface monitor-traffic ether1 once do={
:local up (tx-bits-per-second /1000 );
:local down (rx-bits-per-second /1000 );

:if ( $up < 1024 ) do={
:put "DOWN LINK"
}

:if ( $up > 1024 ) do={
:put "UP LINK"
}

}