Quantcast
Channel: MikroTik
Viewing all articles
Browse latest Browse all 15394

The Dude • Re: Alerts based on throughput threshold

$
0
0
post from @tomislav91 helped me tune my version of script.

# Check if global exists and if not, create default value
:global lastNbwStatus
:set lastNbwStatus "Paused"

# Alert script
/interface monitor-traffic [/interface find name="ether1"] once do={
:local tx (tx-bits-per-second / 1000000); # Convert to Mbps
:local rx (rx-bits-per-second / 1000000); # Convert to Mbps

:if (($tx > 10) || ($rx > 10)) do={
:log warning "ether1 exceeded 10 Mbps"
}
}

:set lastNbwStatus "Paused"

Statistics: Posted by mustaDaBeast — Thu Mar 07, 2024 12:10 pm



Viewing all articles
Browse latest Browse all 15394

Trending Articles