24.11.2014 Views

General Information

General Information

General Information

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Specifications<br />

Packages required: advanced-tools<br />

License required: level1<br />

Home menu level: /tool traffic-monitor<br />

Standards and Technologies: none<br />

Hardware usage: Not significant<br />

Description<br />

The traffic monitor tool is used to execute console scripts when interface traffic crosses a given<br />

threshold. Each item in traffic monitor list consists of its name (which is useful if you want to<br />

disable or change properties of this item from another script), some parameters, specifying traffic<br />

condition, and the pointer to a script or scheduled event to execute when this condition is met.<br />

Property Description<br />

interface (name) - interface to monitor<br />

name (name) - name of the traffic monitor item<br />

on-event (name) - script source. Must be present under /system script<br />

threshold (integer; default: 0) - traffic threshold<br />

traffic (transmitted | received; default: transmitted) - type of traffic to monitor<br />

• transmitted - transmitted traffic<br />

• received - received traffic<br />

trigger (above | always | below; default: above) - condition on which to execute the script<br />

• above - the script will be run each time the traffic exceeds the threshold<br />

• always - triggers scripts on both - above and below condition<br />

• below - triggers script in the opposite condition, when traffic reaches a value that is lower than<br />

the threshold<br />

Example<br />

In this example the traffic monitor enables the interface ether2, if the received treffic exceeds<br />

15kbps on ether1, and disables the interface ether2, if the received traffic falls below 12kbps on<br />

ether1.<br />

[admin@MikroTik] system script> add name=eth-up source={/interface enable ether2}<br />

[admin@MikroTik] system script> add name=eth-down source={/interface disable<br />

{... ether2}<br />

[admin@MikroTik] system script> /tool traffic-monitor<br />

[admin@MikroTik] tool traffic-monitor> add name=turn_on interface=ether1 \<br />

\... on-event=eth-up threshold=15000 trigger=above traffic=received<br />

[admin@MikroTik] tool traffic-monitor> add name=turn_off interface=ether1 \<br />

\... on-event=eth-down threshold=12000 trigger=below traffic=received<br />

[admin@MikroTik] tool traffic-monitor> print<br />

Flags: X - disabled, I - invalid<br />

# NAME INTERFACE TRAFFIC TRIGGER THRESHOLD ON-EVENT<br />

0 turn_on ether1 received above 15000 eth-up<br />

1 turn_off ether1 received below 12000 eth-down<br />

[admin@MikroTik] tool traffic-monitor><br />

Page 540 of 568<br />

Copyright 1999-2005, MikroTik. All rights reserved. Mikrotik, RouterOS and RouterBOARD are trademarks of Mikrotikls SIA.<br />

Other trademarks and registred trademarks mentioned herein are properties of their respective owners.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!