sorry for this dumb question. i use 6.17 version.
i modified this script to monitor each interface tx/rx trafic , my purpose it to prevent servers from flooding inbound/outboud.
let see bellow my running script, and it only tell by email in body tag ‘interface name’ i want also include $rx and $tx and some string , but just dont know how the correct syntax to make that into single line
:foreach i in=[/interface find] do={
/interface monitor-traffic $i once do={
:if ($"rx-bits-per-second" > 15728640) do={
:if ($"name" != "ether8" ) do={
:if ($"name" != "ether3" ) do={
:if ($"name" != "ether1" ) do={
/tool e-mail send subject="RX-15Mb Load Detection" server=1x.7.x.x4 user="me@domain.com" password="passwd" to=reciepent@domain.com port="25" from="me@senderform.com" body="$name"
}
}
# :log info $"name"
# :log info $"name" $"rx-bits-per-second"
}
}
:if ($"name" != "ether8" ) do={
:if ($"name" != "ether3" ) do={
:if ($"name" != "ether1" ) do={
:if ($"tx-bits-per-second" > 15728640) do={
/tool e-mail send subject="TX-15Mb Load Detection" server=1x.7.x.x4 user="me@domain.com" password="passwd" to=reciepent@domain.com port="25" from="me@senderform.com" body="$name"
}
}
# :log info $"name"
# :log info $"name" $"tx-bits-per-second"
}
}
}
i already test some,
body=“Interface = $name TX is $tx-bits-per-second” fail
bidy=(“Interface = $name TX is $tx-bits-per-second”); also fail
in future i want to know if this script can be modified use while loop but with delay 10 sec for every email send ? ,
because now it run on schedule every 10 sec, and i guess it not effective. this purpose need whole time monitor
hope anyone have a better script or can help. sorry for my bad english