MikroTik RouterOS v2.9 Reference Manual page 667

Reference manual
Table of Contents

Advertisement

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
0
turn_on
1
turn_off
[admin@MikroTik] tool traffic-monitor>
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.
INTERFACE
TRAFFIC
ether1
received
ether1
received
TRIGGER THRESHOLD
above
15000
below
12000
ON-EVENT
eth-up
eth-down
Page 653 of 695

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents