EasyManua.ls Logo

MikroTik RouterOS v2.9 - Page 667

MikroTik RouterOS v2.9
709 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
interface ( name ) - interface to monitor
name ( name ) - name of the traffic monitor item
on-event ( name ) - script source. Must be present under /system script
threshold ( integer ; default: 0 ) - traffic threshold
traffic ( transmitted | received ; default: transmitted ) - type of traffic to monitor
transmitted - transmitted traffic
received - received traffic
trigger ( above | always | below ; default: above ) - condition on which to execute the script
above - the script will be run each time the traffic exceeds the threshold
always - triggers scripts on both - above and below condition
below - triggers script in the opposite condition, when traffic reaches a value that is lower than
the threshold
Example
In this example the traffic monitor enables the interface ether2, if the received treffic exceeds
15kbps on ether1, and disables the interface ether2, if the received traffic falls below 12kbps on
ether1.
[admin@MikroTik] system script> add name=eth-up source={/interface enable ether2}
[admin@MikroTik] system script> add name=eth-down source={/interface disable
{... ether2}
[admin@MikroTik] system script> /tool traffic-monitor
[admin@MikroTik] tool traffic-monitor> add name=turn_on interface=ether1 \
\... on-event=eth-up threshold=15000 trigger=above traffic=received
[admin@MikroTik] tool traffic-monitor> add name=turn_off interface=ether1 \
\... on-event=eth-down threshold=12000 trigger=below traffic=received
[admin@MikroTik] tool traffic-monitor> print
Flags: X - disabled, I - invalid
# NAME INTERFACE TRAFFIC TRIGGER THRESHOLD ON-EVENT
0 turn_on ether1 received above 15000 eth-up
1 turn_off ether1 received below 12000 eth-down
[admin@MikroTik] tool traffic-monitor>
Page 653 of 695
Copyright 1999-2007, MikroTik. All rights reserved. Mikrotik, RouterOS and RouterBOARD are trademarks of Mikrotikls SIA.
Other trademarks and registred trademarks mentioned herein are properties of their respective owners.

Table of Contents