Setup guide

{.. subject="Router at second floor is up" to="rieks@latnet.lv"}
[admin@Wandy] system script>
[admin@Wandy] system script> /tool netwatch
[admin@Wandy] system netwatch> add host=10.0.0.215 timeout=999ms \
\... interval=20s up-script=e-up down-script=e-down
[admin@Wandy] tool netwatch> print detail
Flags: X - disabled
0 host=10.0.0.215 timeout=998ms interval=20s since=feb/27/2003 14:15:36
status=up up-script=e-up down-script=e-down
[admin@Wandy] tool netwatch>
Traffic Monitor
Specifications
Packages required: advanced-tools
License required: level1
tool traffic-monitor
Standards and Technologies: none
Hardware usage: Not significant
Description
The traffic monitor tool is used to execute console scripts when interface traffic crosses a given
threshold. Each item in traffic monitor list consists of its name (which is useful if you want to
disable or change properties of this item from another script), some parameters, specifying traffic
condition, and the pointer to a script or scheduled event to execute when this condition is met.
Property Description
name (name) - name of the traffic monitor item
interface (name) - interface to monitor
threshold (integer; default: 0) - traffic threshold
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
traffic (transmitted | received; default: transmitted) - type of traffic to monitor
transmitted - transmitted traffic
received - received traffic
on-event (name) - script source. Must be present under /system script
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@Wandy] system script> add name=eth-up source={/interface enable ether2}
[admin@Wandy] system script> add name=eth-down source={/interface disable
{... ether2}