summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am1
-rw-r--r--gen-monitor-interface-templates.sh74
-rw-r--r--scripts/vyatta-monitor-cleanup2
-rwxr-xr-xscripts/vyatta-tshark.pl103
-rw-r--r--templates/monitor/interfaces/bonding/node.tag/node.def4
-rw-r--r--templates/monitor/interfaces/bonding/node.tag/traffic/detail/filter/node.def1
-rw-r--r--templates/monitor/interfaces/bonding/node.tag/traffic/detail/filter/node.tag/node.def2
-rw-r--r--templates/monitor/interfaces/bonding/node.tag/traffic/detail/node.def2
-rw-r--r--templates/monitor/interfaces/bonding/node.tag/traffic/detail/unlimited/filter/node.def1
-rw-r--r--templates/monitor/interfaces/bonding/node.tag/traffic/detail/unlimited/filter/node.tag/node.def2
-rw-r--r--templates/monitor/interfaces/bonding/node.tag/traffic/detail/unlimited/node.def2
-rw-r--r--templates/monitor/interfaces/bonding/node.tag/traffic/filter/node.def1
-rw-r--r--templates/monitor/interfaces/bonding/node.tag/traffic/filter/node.tag/node.def2
-rw-r--r--templates/monitor/interfaces/bonding/node.tag/traffic/node.def4
-rw-r--r--templates/monitor/interfaces/bonding/node.tag/traffic/save/node.def2
-rw-r--r--templates/monitor/interfaces/bonding/node.tag/traffic/unlimited/filter/node.def1
-rw-r--r--templates/monitor/interfaces/bonding/node.tag/traffic/unlimited/filter/node.tag/node.def2
-rw-r--r--templates/monitor/interfaces/bonding/node.tag/traffic/unlimited/node.def2
-rw-r--r--templates/monitor/interfaces/bridge/node.tag/node.def4
-rw-r--r--templates/monitor/interfaces/bridge/node.tag/traffic/detail/filter/node.def1
-rw-r--r--templates/monitor/interfaces/bridge/node.tag/traffic/detail/filter/node.tag/node.def2
-rw-r--r--templates/monitor/interfaces/bridge/node.tag/traffic/detail/node.def2
-rw-r--r--templates/monitor/interfaces/bridge/node.tag/traffic/detail/unlimited/filter/node.def1
-rw-r--r--templates/monitor/interfaces/bridge/node.tag/traffic/detail/unlimited/filter/node.tag/node.def2
-rw-r--r--templates/monitor/interfaces/bridge/node.tag/traffic/detail/unlimited/node.def2
-rw-r--r--templates/monitor/interfaces/bridge/node.tag/traffic/filter/node.def1
-rw-r--r--templates/monitor/interfaces/bridge/node.tag/traffic/filter/node.tag/node.def2
-rw-r--r--templates/monitor/interfaces/bridge/node.tag/traffic/node.def4
-rw-r--r--templates/monitor/interfaces/bridge/node.tag/traffic/save/node.def2
-rw-r--r--templates/monitor/interfaces/bridge/node.tag/traffic/unlimited/filter/node.def1
-rw-r--r--templates/monitor/interfaces/bridge/node.tag/traffic/unlimited/filter/node.tag/node.def2
-rw-r--r--templates/monitor/interfaces/bridge/node.tag/traffic/unlimited/node.def2
-rw-r--r--templates/monitor/interfaces/ethernet/node.tag/node.def4
-rw-r--r--templates/monitor/interfaces/ethernet/node.tag/traffic/detail/filter/node.def1
-rw-r--r--templates/monitor/interfaces/ethernet/node.tag/traffic/detail/filter/node.tag/node.def2
-rw-r--r--templates/monitor/interfaces/ethernet/node.tag/traffic/detail/node.def2
-rw-r--r--templates/monitor/interfaces/ethernet/node.tag/traffic/detail/unlimited/filter/node.def1
-rw-r--r--templates/monitor/interfaces/ethernet/node.tag/traffic/detail/unlimited/filter/node.tag/node.def2
-rw-r--r--templates/monitor/interfaces/ethernet/node.tag/traffic/detail/unlimited/node.def2
-rw-r--r--templates/monitor/interfaces/ethernet/node.tag/traffic/filter/node.def1
-rw-r--r--templates/monitor/interfaces/ethernet/node.tag/traffic/filter/node.tag/node.def2
-rw-r--r--templates/monitor/interfaces/ethernet/node.tag/traffic/node.def4
-rw-r--r--templates/monitor/interfaces/ethernet/node.tag/traffic/save/node.def2
-rw-r--r--templates/monitor/interfaces/ethernet/node.tag/traffic/unlimited/filter/node.def1
-rw-r--r--templates/monitor/interfaces/ethernet/node.tag/traffic/unlimited/filter/node.tag/node.def2
-rw-r--r--templates/monitor/interfaces/ethernet/node.tag/traffic/unlimited/node.def2
-rw-r--r--templates/monitor/interfaces/loopback/node.tag/node.def4
-rw-r--r--templates/monitor/interfaces/loopback/node.tag/traffic/detail/filter/node.def1
-rw-r--r--templates/monitor/interfaces/loopback/node.tag/traffic/detail/filter/node.tag/node.def2
-rw-r--r--templates/monitor/interfaces/loopback/node.tag/traffic/detail/node.def2
-rw-r--r--templates/monitor/interfaces/loopback/node.tag/traffic/detail/unlimited/filter/node.def1
-rw-r--r--templates/monitor/interfaces/loopback/node.tag/traffic/detail/unlimited/filter/node.tag/node.def2
-rw-r--r--templates/monitor/interfaces/loopback/node.tag/traffic/detail/unlimited/node.def2
-rw-r--r--templates/monitor/interfaces/loopback/node.tag/traffic/filter/node.def1
-rw-r--r--templates/monitor/interfaces/loopback/node.tag/traffic/filter/node.tag/node.def2
-rw-r--r--templates/monitor/interfaces/loopback/node.tag/traffic/node.def4
-rw-r--r--templates/monitor/interfaces/loopback/node.tag/traffic/save/node.def2
-rw-r--r--templates/monitor/interfaces/loopback/node.tag/traffic/unlimited/filter/node.def1
-rw-r--r--templates/monitor/interfaces/loopback/node.tag/traffic/unlimited/filter/node.tag/node.def2
-rw-r--r--templates/monitor/interfaces/loopback/node.tag/traffic/unlimited/node.def2
-rw-r--r--templates/monitor/interfaces/pseudo-ethernet/node.tag/node.def4
-rw-r--r--templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/detail/filter/node.def1
-rw-r--r--templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/detail/filter/node.tag/node.def2
-rw-r--r--templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/detail/node.def2
-rw-r--r--templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/detail/unlimited/filter/node.def1
-rw-r--r--templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/detail/unlimited/filter/node.tag/node.def2
-rw-r--r--templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/detail/unlimited/node.def2
-rw-r--r--templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/filter/node.def1
-rw-r--r--templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/filter/node.tag/node.def2
-rw-r--r--templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/node.def4
-rw-r--r--templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/save/node.def2
-rw-r--r--templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/unlimited/filter/node.def1
-rw-r--r--templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/unlimited/filter/node.tag/node.def2
-rw-r--r--templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/unlimited/node.def2
-rw-r--r--templates/monitor/interfaces/tunnel/node.tag/node.def4
-rw-r--r--templates/monitor/interfaces/tunnel/node.tag/traffic/detail/filter/node.def1
-rw-r--r--templates/monitor/interfaces/tunnel/node.tag/traffic/detail/filter/node.tag/node.def2
-rw-r--r--templates/monitor/interfaces/tunnel/node.tag/traffic/detail/node.def2
-rw-r--r--templates/monitor/interfaces/tunnel/node.tag/traffic/detail/unlimited/filter/node.def1
-rw-r--r--templates/monitor/interfaces/tunnel/node.tag/traffic/detail/unlimited/filter/node.tag/node.def2
-rw-r--r--templates/monitor/interfaces/tunnel/node.tag/traffic/detail/unlimited/node.def2
-rw-r--r--templates/monitor/interfaces/tunnel/node.tag/traffic/filter/node.def1
-rw-r--r--templates/monitor/interfaces/tunnel/node.tag/traffic/filter/node.tag/node.def2
-rw-r--r--templates/monitor/interfaces/tunnel/node.tag/traffic/node.def4
-rw-r--r--templates/monitor/interfaces/tunnel/node.tag/traffic/save/node.def2
-rw-r--r--templates/monitor/interfaces/tunnel/node.tag/traffic/unlimited/filter/node.def1
-rw-r--r--templates/monitor/interfaces/tunnel/node.tag/traffic/unlimited/filter/node.tag/node.def2
-rw-r--r--templates/monitor/interfaces/tunnel/node.tag/traffic/unlimited/node.def2
88 files changed, 329 insertions, 19 deletions
diff --git a/Makefile.am b/Makefile.am
index f69190e..14e4253 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,6 +23,7 @@ bin_SCRIPTS += scripts/vyatta-show-version
bin_SCRIPTS += scripts/vyatta-show-dhclient.pl
bin_SCRIPTS += scripts/vyatta-show-dmi
bin_SCRIPTS += scripts/vyatta-tshark-interface-port.pl
+bin_SCRIPTS += scripts/vyatta-tshark.pl
bin_SCRIPTS += scripts/vyatta-show-bonding.pl
bin_SCRIPTS += scripts/vyatta-cpu-summary.pl
bin_SCRIPTS += scripts/yesno
diff --git a/gen-monitor-interface-templates.sh b/gen-monitor-interface-templates.sh
new file mode 100644
index 0000000..69fe979
--- /dev/null
+++ b/gen-monitor-interface-templates.sh
@@ -0,0 +1,74 @@
+#!/bin/bash
+#monitor interfaces [type] [name] traffic
+#monitor interfaces [type] [name] traffic save [filename]
+#monitor interfaces [type] [name] traffic detail
+#monitor interfaces [type] [name] traffic detail filter
+#monitor interfaces [type] [name] traffic detail unlimited
+#monitor interfaces [type] [name] traffic detail unlimited filter
+#monitor interfaces [type] [name] traffic filter
+#monitor interfaces [type] [name] traffic unlimited
+#monitor interfaces [type] [name] traffic unlimited filter
+
+declare -a types=(
+ "bridge" \
+ "pseudo-ethernet" \
+ "ethernet" \
+ "bonding" \
+ "tunnel" \
+ "loopback" \
+)
+
+for type in "${types[@]}"; do
+ mkdir -p $type/node.tag/traffic/save/node.tag
+ mkdir -p $type/node.tag/traffic/detail/filter/node.tag
+ mkdir -p $type/node.tag/traffic/detail/unlimited/filter/node.tag
+ mkdir -p $type/node.tag/traffic/filter/node.tag
+ mkdir -p $type/node.tag/traffic/unlimited/filter/node.tag
+
+ #node.tag
+ echo "help: Monitor specified $type interface" > $type/node.tag/node.def
+ echo "allowed: \${vyatta_sbindir}/vyatta-interfaces.pl --show $type" >> $type/node.tag/node.def
+ echo "run: \${vyatta_bindir}/vyatta-show-interfaces.pl --intf=\"$4\"" >> $type/node.tag/node.def
+
+ # standard
+ echo "help: Montior captured traffic on specified $type interface" > $type/node.tag/traffic/node.def
+ echo 'run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4' >> $type/node.tag/traffic/node.def
+
+ # save
+ echo 'help: Save monitored traffic to a file' > $type/node.tag/traffic/save/node.def
+ echo -e 'help: Save monitored traffic to a file\nrun: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --save "${@:7}"' > $type/node.tag/traffic/save/node.def
+
+ # detail
+ echo -e "help: Monitor detailed traffic for the specified $type interface"> $type/node.tag/traffic/detail/node.def
+
+ echo -e 'run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail' >> $type/node.tag/traffic/detail/node.def
+
+ # detail filter
+ echo "help: Monitor detailed filtered traffic for the specified $type interface" > $type/node.tag/traffic/detail/filter/node.def
+ echo -e "help: Monitor detailed filtered traffic for the specified $type interface" > $type/node.tag/traffic/detail/filter/node.tag/node.def
+ echo 'run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail --filter "${@:8}"' >> $type/node.tag/traffic/detail/filter/node.tag/node.def
+
+ # detail unlimited
+ echo -e "help: Monitor detailed traffic for the specified $type interface" > $type/node.tag/traffic/detail/unlimited/node.def
+ echo 'run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail --unlimited' >> $type/node.tag/traffic/detail/unlimited/node.def
+
+ # detail unlimited filter
+ echo "help: Monitor detailed filtered traffic for the specified $type interface" > $type/node.tag/traffic/detail/unlimited/filter/node.def
+ echo "help: Monitor detailed filtered traffic for the specified $type interface" > $type/node.tag/traffic/detail/unlimited/filter/node.tag/node.def
+ echo 'run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail --unlimited --filter "${@:9}"' >> $type/node.tag/traffic/detail/unlimited/filter/node.tag/node.def
+
+ #filter
+ echo "help: Monitor filtered traffic for the specified $type interface" > $type/node.tag/traffic/filter/node.def
+ echo "help: Monitor filtered traffic for the specified $type interface" > $type/node.tag/traffic/filter/node.tag/node.def
+ echo 'run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --filter "${@:7}"' >> $type/node.tag/traffic/filter/node.tag/node.def
+
+ # unlimited
+ echo "help: Monitor traffic for the specified $type interface" > $type/node.tag/traffic/unlimited/node.def
+ echo 'run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --unlimited' >> $type/node.tag/traffic/unlimited/node.def
+
+ # unlimited filter
+ echo "help: Monitor filtered traffic for the specified $type interface" > $type/node.tag/traffic/unlimited/filter/node.def
+ echo "help: Monitor filtered traffic for the specified $type interface" > $type/node.tag/traffic/unlimited/filter/node.tag/node.def
+ echo 'run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --unlimited --filter "${@:8}"' >> $type/node.tag/traffic/unlimited/filter/node.tag/node.def
+
+done
diff --git a/scripts/vyatta-monitor-cleanup b/scripts/vyatta-monitor-cleanup
index cd08cbc..553c1f8 100644
--- a/scripts/vyatta-monitor-cleanup
+++ b/scripts/vyatta-monitor-cleanup
@@ -4,7 +4,7 @@ declare CURRENT_UID=$(id -u)
declare CURRENT_UNAME=$(id -un)
declare -a MPIDS
MODE=$1
-MPIDS=( $(ls /var/run/vyatta/monitor/*.pid) )
+MPIDS=( $(ls /var/run/vyatta/monitor/*.pid 2> /dev/null ) )
for pidfile in "${MPIDS[@]}"; do
pid=$(<$pidfile)
diff --git a/scripts/vyatta-tshark.pl b/scripts/vyatta-tshark.pl
new file mode 100755
index 0000000..103808d
--- /dev/null
+++ b/scripts/vyatta-tshark.pl
@@ -0,0 +1,103 @@
+#!/usr/bin/perl
+#
+# Module: vyatta-tshark-interface-port.pl
+#
+# **** License ****
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# This code was originally developed by Vyatta, Inc.
+# Portions created by Vyatta are Copyright (C) 2006, 2007, 2008 Vyatta, Inc.
+# All Rights Reserved.
+#
+# Author: John Southworth
+# Date: Sept. 2011
+# Description: run tshark on a given interface with options
+#
+# **** End License ****
+#
+
+use lib "/opt/vyatta/share/perl5/";
+
+use strict;
+use warnings;
+use Getopt::Long;
+
+sub check_if_interface_is_tsharkable {
+ my $interface = shift;
+
+ my @grep_tshark_interfaces = `sudo /usr/bin/tshark -D | grep $interface`;
+ my $any_interface;
+
+ for my $count (0 .. $#grep_tshark_interfaces) {
+ my @temp = split(/ /,$grep_tshark_interfaces[$count]);
+ chomp $temp[1];
+ $grep_tshark_interfaces[$count] = $temp[1];
+ }
+
+ my $exact_match = 0;
+ for my $count (0 .. $#grep_tshark_interfaces) {
+ if ($grep_tshark_interfaces[$count] eq $interface) {
+ $exact_match = 1;
+ $any_interface = $grep_tshark_interfaces[$count];
+ }
+ }
+ if ($exact_match == 0 || $any_interface eq 'any') {
+ print "Unable to capture traffic on $interface\n";
+ exit 1;
+ }
+}
+
+#
+# main
+#
+my ($detail,$filter,$intf,$unlimited);
+
+GetOptions("detail!" => \$detail,
+ "filter=s" => \$filter,
+ "intf=s" => \$intf,
+ "unlimited!" => \$unlimited);
+
+check_if_interface_is_tsharkable($intf);
+
+if (defined($filter)) {
+ if (defined($detail)) {
+ if (defined($unlimited)){
+ print "Capturing traffic on $intf ...\n";
+ exec "sudo /usr/bin/tshark -n -i $intf -V $filter 2> /dev/null";
+ } else {
+ print "Capturing traffic on $intf ...\n";
+ exec "sudo /usr/bin/tshark -n -i $intf -c 1000 -V $filter 2> /dev/null";
+ }
+ } elsif (defined($unlimited)) {
+ print "Capturing traffic on $intf ...\n";
+ exec "sudo /usr/bin/tshark -n -i $intf $filter 2> /dev/null";
+ } else {
+ print "Capturing traffic on $intf ...\n";
+ exec "sudo /usr/bin/tshark -n -i $intf -c 1000 $filter 2> /dev/null";
+ }
+} elsif (defined($detail)) {
+ if (defined($unlimited)) {
+ print "Capturing traffic on $intf ...\n";
+ exec "sudo /usr/bin/tshark -n -i $intf -V 2> /dev/null";
+ } else {
+ print "Capturing traffic on $intf ...\n";
+ exec "sudo /usr/bin/tshark -n -i $intf -c 1000 -V 2> /dev/null";
+ }
+} elsif (defined($unlimited)) {
+ print "Capturing traffic on $intf ...\n";
+ exec "sudo /usr/bin/tshark -n -i $intf 2> /dev/null";
+} else {
+ print "Capturing traffic on $intf ...\n";
+ exec "sudo /usr/bin/tshark -n -i $intf -c 1000 2> /dev/null";
+}
+
+exit 0;
+
+#end of file
diff --git a/templates/monitor/interfaces/bonding/node.tag/node.def b/templates/monitor/interfaces/bonding/node.tag/node.def
index 61ad641..f1ea258 100644
--- a/templates/monitor/interfaces/bonding/node.tag/node.def
+++ b/templates/monitor/interfaces/bonding/node.tag/node.def
@@ -1 +1,3 @@
-help: Monitor a specified bonding interface
+help: Monitor specified bonding interface
+allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show bonding
+run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf=""
diff --git a/templates/monitor/interfaces/bonding/node.tag/traffic/detail/filter/node.def b/templates/monitor/interfaces/bonding/node.tag/traffic/detail/filter/node.def
new file mode 100644
index 0000000..79d2994
--- /dev/null
+++ b/templates/monitor/interfaces/bonding/node.tag/traffic/detail/filter/node.def
@@ -0,0 +1 @@
+help: Monitor detailed filtered traffic for the specified bonding interface
diff --git a/templates/monitor/interfaces/bonding/node.tag/traffic/detail/filter/node.tag/node.def b/templates/monitor/interfaces/bonding/node.tag/traffic/detail/filter/node.tag/node.def
new file mode 100644
index 0000000..90ab82a
--- /dev/null
+++ b/templates/monitor/interfaces/bonding/node.tag/traffic/detail/filter/node.tag/node.def
@@ -0,0 +1,2 @@
+help: Monitor detailed filtered traffic for the specified bonding interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail --filter "${@:8}"
diff --git a/templates/monitor/interfaces/bonding/node.tag/traffic/detail/node.def b/templates/monitor/interfaces/bonding/node.tag/traffic/detail/node.def
new file mode 100644
index 0000000..b9888ff
--- /dev/null
+++ b/templates/monitor/interfaces/bonding/node.tag/traffic/detail/node.def
@@ -0,0 +1,2 @@
+help: Monitor detailed traffic for the specified bonding interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail
diff --git a/templates/monitor/interfaces/bonding/node.tag/traffic/detail/unlimited/filter/node.def b/templates/monitor/interfaces/bonding/node.tag/traffic/detail/unlimited/filter/node.def
new file mode 100644
index 0000000..79d2994
--- /dev/null
+++ b/templates/monitor/interfaces/bonding/node.tag/traffic/detail/unlimited/filter/node.def
@@ -0,0 +1 @@
+help: Monitor detailed filtered traffic for the specified bonding interface
diff --git a/templates/monitor/interfaces/bonding/node.tag/traffic/detail/unlimited/filter/node.tag/node.def b/templates/monitor/interfaces/bonding/node.tag/traffic/detail/unlimited/filter/node.tag/node.def
new file mode 100644
index 0000000..72de272
--- /dev/null
+++ b/templates/monitor/interfaces/bonding/node.tag/traffic/detail/unlimited/filter/node.tag/node.def
@@ -0,0 +1,2 @@
+help: Monitor detailed filtered traffic for the specified bonding interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail --unlimited --filter "${@:9}"
diff --git a/templates/monitor/interfaces/bonding/node.tag/traffic/detail/unlimited/node.def b/templates/monitor/interfaces/bonding/node.tag/traffic/detail/unlimited/node.def
new file mode 100644
index 0000000..0939fee
--- /dev/null
+++ b/templates/monitor/interfaces/bonding/node.tag/traffic/detail/unlimited/node.def
@@ -0,0 +1,2 @@
+help: Monitor detailed traffic for the specified bonding interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail --unlimited
diff --git a/templates/monitor/interfaces/bonding/node.tag/traffic/filter/node.def b/templates/monitor/interfaces/bonding/node.tag/traffic/filter/node.def
new file mode 100644
index 0000000..8b77d3a
--- /dev/null
+++ b/templates/monitor/interfaces/bonding/node.tag/traffic/filter/node.def
@@ -0,0 +1 @@
+help: Monitor filtered traffic for the specified bonding interface
diff --git a/templates/monitor/interfaces/bonding/node.tag/traffic/filter/node.tag/node.def b/templates/monitor/interfaces/bonding/node.tag/traffic/filter/node.tag/node.def
new file mode 100644
index 0000000..dbb9188
--- /dev/null
+++ b/templates/monitor/interfaces/bonding/node.tag/traffic/filter/node.tag/node.def
@@ -0,0 +1,2 @@
+help: Monitor filtered traffic for the specified bonding interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --filter "${@:7}"
diff --git a/templates/monitor/interfaces/bonding/node.tag/traffic/node.def b/templates/monitor/interfaces/bonding/node.tag/traffic/node.def
index e186876..247c1d9 100644
--- a/templates/monitor/interfaces/bonding/node.tag/traffic/node.def
+++ b/templates/monitor/interfaces/bonding/node.tag/traffic/node.def
@@ -1,2 +1,2 @@
-help: Monitor captured traffic on specified bonding interface
-run: /opt/vyatta/bin/vyatta-tshark-interface-port.pl "$4"
+help: Montior captured traffic on specified bonding interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4
diff --git a/templates/monitor/interfaces/bonding/node.tag/traffic/save/node.def b/templates/monitor/interfaces/bonding/node.tag/traffic/save/node.def
new file mode 100644
index 0000000..bd747b5
--- /dev/null
+++ b/templates/monitor/interfaces/bonding/node.tag/traffic/save/node.def
@@ -0,0 +1,2 @@
+help: Save monitored traffic to a file
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --save "${@:7}"
diff --git a/templates/monitor/interfaces/bonding/node.tag/traffic/unlimited/filter/node.def b/templates/monitor/interfaces/bonding/node.tag/traffic/unlimited/filter/node.def
new file mode 100644
index 0000000..8b77d3a
--- /dev/null
+++ b/templates/monitor/interfaces/bonding/node.tag/traffic/unlimited/filter/node.def
@@ -0,0 +1 @@
+help: Monitor filtered traffic for the specified bonding interface
diff --git a/templates/monitor/interfaces/bonding/node.tag/traffic/unlimited/filter/node.tag/node.def b/templates/monitor/interfaces/bonding/node.tag/traffic/unlimited/filter/node.tag/node.def
new file mode 100644
index 0000000..372d39e
--- /dev/null
+++ b/templates/monitor/interfaces/bonding/node.tag/traffic/unlimited/filter/node.tag/node.def
@@ -0,0 +1,2 @@
+help: Monitor filtered traffic for the specified bonding interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --unlimited --filter "${@:8}"
diff --git a/templates/monitor/interfaces/bonding/node.tag/traffic/unlimited/node.def b/templates/monitor/interfaces/bonding/node.tag/traffic/unlimited/node.def
new file mode 100644
index 0000000..bc5997b
--- /dev/null
+++ b/templates/monitor/interfaces/bonding/node.tag/traffic/unlimited/node.def
@@ -0,0 +1,2 @@
+help: Monitor traffic for the specified bonding interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --unlimited
diff --git a/templates/monitor/interfaces/bridge/node.tag/node.def b/templates/monitor/interfaces/bridge/node.tag/node.def
index 8f86b7c..cd1695a 100644
--- a/templates/monitor/interfaces/bridge/node.tag/node.def
+++ b/templates/monitor/interfaces/bridge/node.tag/node.def
@@ -1 +1,3 @@
-help: Monitor a specified bridge interface
+help: Monitor specified bridge interface
+allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show bridge
+run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf=""
diff --git a/templates/monitor/interfaces/bridge/node.tag/traffic/detail/filter/node.def b/templates/monitor/interfaces/bridge/node.tag/traffic/detail/filter/node.def
new file mode 100644
index 0000000..68f59a7
--- /dev/null
+++ b/templates/monitor/interfaces/bridge/node.tag/traffic/detail/filter/node.def
@@ -0,0 +1 @@
+help: Monitor detailed filtered traffic for the specified bridge interface
diff --git a/templates/monitor/interfaces/bridge/node.tag/traffic/detail/filter/node.tag/node.def b/templates/monitor/interfaces/bridge/node.tag/traffic/detail/filter/node.tag/node.def
new file mode 100644
index 0000000..c06ffe1
--- /dev/null
+++ b/templates/monitor/interfaces/bridge/node.tag/traffic/detail/filter/node.tag/node.def
@@ -0,0 +1,2 @@
+help: Monitor detailed filtered traffic for the specified bridge interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail --filter "${@:8}"
diff --git a/templates/monitor/interfaces/bridge/node.tag/traffic/detail/node.def b/templates/monitor/interfaces/bridge/node.tag/traffic/detail/node.def
new file mode 100644
index 0000000..da75a0d
--- /dev/null
+++ b/templates/monitor/interfaces/bridge/node.tag/traffic/detail/node.def
@@ -0,0 +1,2 @@
+help: Monitor detailed traffic for the specified bridge interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail
diff --git a/templates/monitor/interfaces/bridge/node.tag/traffic/detail/unlimited/filter/node.def b/templates/monitor/interfaces/bridge/node.tag/traffic/detail/unlimited/filter/node.def
new file mode 100644
index 0000000..68f59a7
--- /dev/null
+++ b/templates/monitor/interfaces/bridge/node.tag/traffic/detail/unlimited/filter/node.def
@@ -0,0 +1 @@
+help: Monitor detailed filtered traffic for the specified bridge interface
diff --git a/templates/monitor/interfaces/bridge/node.tag/traffic/detail/unlimited/filter/node.tag/node.def b/templates/monitor/interfaces/bridge/node.tag/traffic/detail/unlimited/filter/node.tag/node.def
new file mode 100644
index 0000000..c1685ab
--- /dev/null
+++ b/templates/monitor/interfaces/bridge/node.tag/traffic/detail/unlimited/filter/node.tag/node.def
@@ -0,0 +1,2 @@
+help: Monitor detailed filtered traffic for the specified bridge interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail --unlimited --filter "${@:9}"
diff --git a/templates/monitor/interfaces/bridge/node.tag/traffic/detail/unlimited/node.def b/templates/monitor/interfaces/bridge/node.tag/traffic/detail/unlimited/node.def
new file mode 100644
index 0000000..ebd1372
--- /dev/null
+++ b/templates/monitor/interfaces/bridge/node.tag/traffic/detail/unlimited/node.def
@@ -0,0 +1,2 @@
+help: Monitor detailed traffic for the specified bridge interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail --unlimited
diff --git a/templates/monitor/interfaces/bridge/node.tag/traffic/filter/node.def b/templates/monitor/interfaces/bridge/node.tag/traffic/filter/node.def
new file mode 100644
index 0000000..f9a5aa7
--- /dev/null
+++ b/templates/monitor/interfaces/bridge/node.tag/traffic/filter/node.def
@@ -0,0 +1 @@
+help: Monitor filtered traffic for the specified bridge interface
diff --git a/templates/monitor/interfaces/bridge/node.tag/traffic/filter/node.tag/node.def b/templates/monitor/interfaces/bridge/node.tag/traffic/filter/node.tag/node.def
new file mode 100644
index 0000000..4d22914
--- /dev/null
+++ b/templates/monitor/interfaces/bridge/node.tag/traffic/filter/node.tag/node.def
@@ -0,0 +1,2 @@
+help: Monitor filtered traffic for the specified bridge interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --filter "${@:7}"
diff --git a/templates/monitor/interfaces/bridge/node.tag/traffic/node.def b/templates/monitor/interfaces/bridge/node.tag/traffic/node.def
index db42c6d..f416289 100644
--- a/templates/monitor/interfaces/bridge/node.tag/traffic/node.def
+++ b/templates/monitor/interfaces/bridge/node.tag/traffic/node.def
@@ -1,2 +1,2 @@
-help: Monitor captured traffic on specified bridge interface
-run: /opt/vyatta/bin/vyatta-tshark-interface-port.pl "$4"
+help: Montior captured traffic on specified bridge interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4
diff --git a/templates/monitor/interfaces/bridge/node.tag/traffic/save/node.def b/templates/monitor/interfaces/bridge/node.tag/traffic/save/node.def
new file mode 100644
index 0000000..bd747b5
--- /dev/null
+++ b/templates/monitor/interfaces/bridge/node.tag/traffic/save/node.def
@@ -0,0 +1,2 @@
+help: Save monitored traffic to a file
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --save "${@:7}"
diff --git a/templates/monitor/interfaces/bridge/node.tag/traffic/unlimited/filter/node.def b/templates/monitor/interfaces/bridge/node.tag/traffic/unlimited/filter/node.def
new file mode 100644
index 0000000..f9a5aa7
--- /dev/null
+++ b/templates/monitor/interfaces/bridge/node.tag/traffic/unlimited/filter/node.def
@@ -0,0 +1 @@
+help: Monitor filtered traffic for the specified bridge interface
diff --git a/templates/monitor/interfaces/bridge/node.tag/traffic/unlimited/filter/node.tag/node.def b/templates/monitor/interfaces/bridge/node.tag/traffic/unlimited/filter/node.tag/node.def
new file mode 100644
index 0000000..549b26f
--- /dev/null
+++ b/templates/monitor/interfaces/bridge/node.tag/traffic/unlimited/filter/node.tag/node.def
@@ -0,0 +1,2 @@
+help: Monitor filtered traffic for the specified bridge interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --unlimited --filter "${@:8}"
diff --git a/templates/monitor/interfaces/bridge/node.tag/traffic/unlimited/node.def b/templates/monitor/interfaces/bridge/node.tag/traffic/unlimited/node.def
new file mode 100644
index 0000000..2fd4776
--- /dev/null
+++ b/templates/monitor/interfaces/bridge/node.tag/traffic/unlimited/node.def
@@ -0,0 +1,2 @@
+help: Monitor traffic for the specified bridge interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --unlimited
diff --git a/templates/monitor/interfaces/ethernet/node.tag/node.def b/templates/monitor/interfaces/ethernet/node.tag/node.def
index 23616b5..e76b5ab 100644
--- a/templates/monitor/interfaces/ethernet/node.tag/node.def
+++ b/templates/monitor/interfaces/ethernet/node.tag/node.def
@@ -1 +1,3 @@
-help: Monitor a specified ethernet interface
+help: Monitor specified ethernet interface
+allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show ethernet
+run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf=""
diff --git a/templates/monitor/interfaces/ethernet/node.tag/traffic/detail/filter/node.def b/templates/monitor/interfaces/ethernet/node.tag/traffic/detail/filter/node.def
new file mode 100644
index 0000000..b8da469
--- /dev/null
+++ b/templates/monitor/interfaces/ethernet/node.tag/traffic/detail/filter/node.def
@@ -0,0 +1 @@
+help: Monitor detailed filtered traffic for the specified ethernet interface
diff --git a/templates/monitor/interfaces/ethernet/node.tag/traffic/detail/filter/node.tag/node.def b/templates/monitor/interfaces/ethernet/node.tag/traffic/detail/filter/node.tag/node.def
new file mode 100644
index 0000000..53340e6
--- /dev/null
+++ b/templates/monitor/interfaces/ethernet/node.tag/traffic/detail/filter/node.tag/node.def
@@ -0,0 +1,2 @@
+help: Monitor detailed filtered traffic for the specified ethernet interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail --filter "${@:8}"
diff --git a/templates/monitor/interfaces/ethernet/node.tag/traffic/detail/node.def b/templates/monitor/interfaces/ethernet/node.tag/traffic/detail/node.def
new file mode 100644
index 0000000..4127943
--- /dev/null
+++ b/templates/monitor/interfaces/ethernet/node.tag/traffic/detail/node.def
@@ -0,0 +1,2 @@
+help: Monitor detailed traffic for the specified ethernet interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail
diff --git a/templates/monitor/interfaces/ethernet/node.tag/traffic/detail/unlimited/filter/node.def b/templates/monitor/interfaces/ethernet/node.tag/traffic/detail/unlimited/filter/node.def
new file mode 100644
index 0000000..b8da469
--- /dev/null
+++ b/templates/monitor/interfaces/ethernet/node.tag/traffic/detail/unlimited/filter/node.def
@@ -0,0 +1 @@
+help: Monitor detailed filtered traffic for the specified ethernet interface
diff --git a/templates/monitor/interfaces/ethernet/node.tag/traffic/detail/unlimited/filter/node.tag/node.def b/templates/monitor/interfaces/ethernet/node.tag/traffic/detail/unlimited/filter/node.tag/node.def
new file mode 100644
index 0000000..f45d4d2
--- /dev/null
+++ b/templates/monitor/interfaces/ethernet/node.tag/traffic/detail/unlimited/filter/node.tag/node.def
@@ -0,0 +1,2 @@
+help: Monitor detailed filtered traffic for the specified ethernet interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail --unlimited --filter "${@:9}"
diff --git a/templates/monitor/interfaces/ethernet/node.tag/traffic/detail/unlimited/node.def b/templates/monitor/interfaces/ethernet/node.tag/traffic/detail/unlimited/node.def
new file mode 100644
index 0000000..8d81c5e
--- /dev/null
+++ b/templates/monitor/interfaces/ethernet/node.tag/traffic/detail/unlimited/node.def
@@ -0,0 +1,2 @@
+help: Monitor detailed traffic for the specified ethernet interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail --unlimited
diff --git a/templates/monitor/interfaces/ethernet/node.tag/traffic/filter/node.def b/templates/monitor/interfaces/ethernet/node.tag/traffic/filter/node.def
new file mode 100644
index 0000000..8a12510
--- /dev/null
+++ b/templates/monitor/interfaces/ethernet/node.tag/traffic/filter/node.def
@@ -0,0 +1 @@
+help: Monitor filtered traffic for the specified ethernet interface
diff --git a/templates/monitor/interfaces/ethernet/node.tag/traffic/filter/node.tag/node.def b/templates/monitor/interfaces/ethernet/node.tag/traffic/filter/node.tag/node.def
new file mode 100644
index 0000000..ca69cbf
--- /dev/null
+++ b/templates/monitor/interfaces/ethernet/node.tag/traffic/filter/node.tag/node.def
@@ -0,0 +1,2 @@
+help: Monitor filtered traffic for the specified ethernet interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --filter "${@:7}"
diff --git a/templates/monitor/interfaces/ethernet/node.tag/traffic/node.def b/templates/monitor/interfaces/ethernet/node.tag/traffic/node.def
index 359330f..f74073a 100644
--- a/templates/monitor/interfaces/ethernet/node.tag/traffic/node.def
+++ b/templates/monitor/interfaces/ethernet/node.tag/traffic/node.def
@@ -1,2 +1,2 @@
-help: Monitor captured traffic on specified ethernet interface
-run: /opt/vyatta/bin/vyatta-tshark-interface-port.pl "$4"
+help: Montior captured traffic on specified ethernet interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4
diff --git a/templates/monitor/interfaces/ethernet/node.tag/traffic/save/node.def b/templates/monitor/interfaces/ethernet/node.tag/traffic/save/node.def
new file mode 100644
index 0000000..bd747b5
--- /dev/null
+++ b/templates/monitor/interfaces/ethernet/node.tag/traffic/save/node.def
@@ -0,0 +1,2 @@
+help: Save monitored traffic to a file
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --save "${@:7}"
diff --git a/templates/monitor/interfaces/ethernet/node.tag/traffic/unlimited/filter/node.def b/templates/monitor/interfaces/ethernet/node.tag/traffic/unlimited/filter/node.def
new file mode 100644
index 0000000..8a12510
--- /dev/null
+++ b/templates/monitor/interfaces/ethernet/node.tag/traffic/unlimited/filter/node.def
@@ -0,0 +1 @@
+help: Monitor filtered traffic for the specified ethernet interface
diff --git a/templates/monitor/interfaces/ethernet/node.tag/traffic/unlimited/filter/node.tag/node.def b/templates/monitor/interfaces/ethernet/node.tag/traffic/unlimited/filter/node.tag/node.def
new file mode 100644
index 0000000..acf6cca
--- /dev/null
+++ b/templates/monitor/interfaces/ethernet/node.tag/traffic/unlimited/filter/node.tag/node.def
@@ -0,0 +1,2 @@
+help: Monitor filtered traffic for the specified ethernet interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --unlimited --filter "${@:8}"
diff --git a/templates/monitor/interfaces/ethernet/node.tag/traffic/unlimited/node.def b/templates/monitor/interfaces/ethernet/node.tag/traffic/unlimited/node.def
new file mode 100644
index 0000000..55b6b99
--- /dev/null
+++ b/templates/monitor/interfaces/ethernet/node.tag/traffic/unlimited/node.def
@@ -0,0 +1,2 @@
+help: Monitor traffic for the specified ethernet interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --unlimited
diff --git a/templates/monitor/interfaces/loopback/node.tag/node.def b/templates/monitor/interfaces/loopback/node.tag/node.def
index b82e0c5..d8e0e3b 100644
--- a/templates/monitor/interfaces/loopback/node.tag/node.def
+++ b/templates/monitor/interfaces/loopback/node.tag/node.def
@@ -1 +1,3 @@
-help: Monitor a specified loopback interface
+help: Monitor specified loopback interface
+allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show loopback
+run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf=""
diff --git a/templates/monitor/interfaces/loopback/node.tag/traffic/detail/filter/node.def b/templates/monitor/interfaces/loopback/node.tag/traffic/detail/filter/node.def
new file mode 100644
index 0000000..8400ea6
--- /dev/null
+++ b/templates/monitor/interfaces/loopback/node.tag/traffic/detail/filter/node.def
@@ -0,0 +1 @@
+help: Monitor detailed filtered traffic for the specified loopback interface
diff --git a/templates/monitor/interfaces/loopback/node.tag/traffic/detail/filter/node.tag/node.def b/templates/monitor/interfaces/loopback/node.tag/traffic/detail/filter/node.tag/node.def
new file mode 100644
index 0000000..76d8f57
--- /dev/null
+++ b/templates/monitor/interfaces/loopback/node.tag/traffic/detail/filter/node.tag/node.def
@@ -0,0 +1,2 @@
+help: Monitor detailed filtered traffic for the specified loopback interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail --filter "${@:8}"
diff --git a/templates/monitor/interfaces/loopback/node.tag/traffic/detail/node.def b/templates/monitor/interfaces/loopback/node.tag/traffic/detail/node.def
new file mode 100644
index 0000000..4137e13
--- /dev/null
+++ b/templates/monitor/interfaces/loopback/node.tag/traffic/detail/node.def
@@ -0,0 +1,2 @@
+help: Monitor detailed traffic for the specified loopback interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail
diff --git a/templates/monitor/interfaces/loopback/node.tag/traffic/detail/unlimited/filter/node.def b/templates/monitor/interfaces/loopback/node.tag/traffic/detail/unlimited/filter/node.def
new file mode 100644
index 0000000..8400ea6
--- /dev/null
+++ b/templates/monitor/interfaces/loopback/node.tag/traffic/detail/unlimited/filter/node.def
@@ -0,0 +1 @@
+help: Monitor detailed filtered traffic for the specified loopback interface
diff --git a/templates/monitor/interfaces/loopback/node.tag/traffic/detail/unlimited/filter/node.tag/node.def b/templates/monitor/interfaces/loopback/node.tag/traffic/detail/unlimited/filter/node.tag/node.def
new file mode 100644
index 0000000..b9ec0c8
--- /dev/null
+++ b/templates/monitor/interfaces/loopback/node.tag/traffic/detail/unlimited/filter/node.tag/node.def
@@ -0,0 +1,2 @@
+help: Monitor detailed filtered traffic for the specified loopback interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail --unlimited --filter "${@:9}"
diff --git a/templates/monitor/interfaces/loopback/node.tag/traffic/detail/unlimited/node.def b/templates/monitor/interfaces/loopback/node.tag/traffic/detail/unlimited/node.def
new file mode 100644
index 0000000..fe5015e
--- /dev/null
+++ b/templates/monitor/interfaces/loopback/node.tag/traffic/detail/unlimited/node.def
@@ -0,0 +1,2 @@
+help: Monitor detailed traffic for the specified loopback interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail --unlimited
diff --git a/templates/monitor/interfaces/loopback/node.tag/traffic/filter/node.def b/templates/monitor/interfaces/loopback/node.tag/traffic/filter/node.def
new file mode 100644
index 0000000..5e7a229
--- /dev/null
+++ b/templates/monitor/interfaces/loopback/node.tag/traffic/filter/node.def
@@ -0,0 +1 @@
+help: Monitor filtered traffic for the specified loopback interface
diff --git a/templates/monitor/interfaces/loopback/node.tag/traffic/filter/node.tag/node.def b/templates/monitor/interfaces/loopback/node.tag/traffic/filter/node.tag/node.def
new file mode 100644
index 0000000..a6fd177
--- /dev/null
+++ b/templates/monitor/interfaces/loopback/node.tag/traffic/filter/node.tag/node.def
@@ -0,0 +1,2 @@
+help: Monitor filtered traffic for the specified loopback interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --filter "${@:7}"
diff --git a/templates/monitor/interfaces/loopback/node.tag/traffic/node.def b/templates/monitor/interfaces/loopback/node.tag/traffic/node.def
index 013fc84..9f6554f 100644
--- a/templates/monitor/interfaces/loopback/node.tag/traffic/node.def
+++ b/templates/monitor/interfaces/loopback/node.tag/traffic/node.def
@@ -1,2 +1,2 @@
-help: Monitor captured traffic on loopback interface
-run: /opt/vyatta/bin/vyatta-tshark-interface-port.pl "$4"
+help: Montior captured traffic on specified loopback interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4
diff --git a/templates/monitor/interfaces/loopback/node.tag/traffic/save/node.def b/templates/monitor/interfaces/loopback/node.tag/traffic/save/node.def
new file mode 100644
index 0000000..bd747b5
--- /dev/null
+++ b/templates/monitor/interfaces/loopback/node.tag/traffic/save/node.def
@@ -0,0 +1,2 @@
+help: Save monitored traffic to a file
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --save "${@:7}"
diff --git a/templates/monitor/interfaces/loopback/node.tag/traffic/unlimited/filter/node.def b/templates/monitor/interfaces/loopback/node.tag/traffic/unlimited/filter/node.def
new file mode 100644
index 0000000..5e7a229
--- /dev/null
+++ b/templates/monitor/interfaces/loopback/node.tag/traffic/unlimited/filter/node.def
@@ -0,0 +1 @@
+help: Monitor filtered traffic for the specified loopback interface
diff --git a/templates/monitor/interfaces/loopback/node.tag/traffic/unlimited/filter/node.tag/node.def b/templates/monitor/interfaces/loopback/node.tag/traffic/unlimited/filter/node.tag/node.def
new file mode 100644
index 0000000..2a69477
--- /dev/null
+++ b/templates/monitor/interfaces/loopback/node.tag/traffic/unlimited/filter/node.tag/node.def
@@ -0,0 +1,2 @@
+help: Monitor filtered traffic for the specified loopback interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --unlimited --filter "${@:8}"
diff --git a/templates/monitor/interfaces/loopback/node.tag/traffic/unlimited/node.def b/templates/monitor/interfaces/loopback/node.tag/traffic/unlimited/node.def
new file mode 100644
index 0000000..3ac318c
--- /dev/null
+++ b/templates/monitor/interfaces/loopback/node.tag/traffic/unlimited/node.def
@@ -0,0 +1,2 @@
+help: Monitor traffic for the specified loopback interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --unlimited
diff --git a/templates/monitor/interfaces/pseudo-ethernet/node.tag/node.def b/templates/monitor/interfaces/pseudo-ethernet/node.tag/node.def
index 459219b..b538150 100644
--- a/templates/monitor/interfaces/pseudo-ethernet/node.tag/node.def
+++ b/templates/monitor/interfaces/pseudo-ethernet/node.tag/node.def
@@ -1 +1,3 @@
-help: Monitor a specified pseudo-ethernet interface
+help: Monitor specified pseudo-ethernet interface
+allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show pseudo-ethernet
+run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf=""
diff --git a/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/detail/filter/node.def b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/detail/filter/node.def
new file mode 100644
index 0000000..1981911
--- /dev/null
+++ b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/detail/filter/node.def
@@ -0,0 +1 @@
+help: Monitor detailed filtered traffic for the specified pseudo-ethernet interface
diff --git a/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/detail/filter/node.tag/node.def b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/detail/filter/node.tag/node.def
new file mode 100644
index 0000000..9b80e96
--- /dev/null
+++ b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/detail/filter/node.tag/node.def
@@ -0,0 +1,2 @@
+help: Monitor detailed filtered traffic for the specified pseudo-ethernet interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail --filter "${@:8}"
diff --git a/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/detail/node.def b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/detail/node.def
new file mode 100644
index 0000000..7e304a2
--- /dev/null
+++ b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/detail/node.def
@@ -0,0 +1,2 @@
+help: Monitor detailed traffic for the specified pseudo-ethernet interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail
diff --git a/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/detail/unlimited/filter/node.def b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/detail/unlimited/filter/node.def
new file mode 100644
index 0000000..1981911
--- /dev/null
+++ b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/detail/unlimited/filter/node.def
@@ -0,0 +1 @@
+help: Monitor detailed filtered traffic for the specified pseudo-ethernet interface
diff --git a/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/detail/unlimited/filter/node.tag/node.def b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/detail/unlimited/filter/node.tag/node.def
new file mode 100644
index 0000000..b64818d
--- /dev/null
+++ b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/detail/unlimited/filter/node.tag/node.def
@@ -0,0 +1,2 @@
+help: Monitor detailed filtered traffic for the specified pseudo-ethernet interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail --unlimited --filter "${@:9}"
diff --git a/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/detail/unlimited/node.def b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/detail/unlimited/node.def
new file mode 100644
index 0000000..63c645f
--- /dev/null
+++ b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/detail/unlimited/node.def
@@ -0,0 +1,2 @@
+help: Monitor detailed traffic for the specified pseudo-ethernet interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail --unlimited
diff --git a/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/filter/node.def b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/filter/node.def
new file mode 100644
index 0000000..5302dd7
--- /dev/null
+++ b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/filter/node.def
@@ -0,0 +1 @@
+help: Monitor filtered traffic for the specified pseudo-ethernet interface
diff --git a/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/filter/node.tag/node.def b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/filter/node.tag/node.def
new file mode 100644
index 0000000..fded0bf
--- /dev/null
+++ b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/filter/node.tag/node.def
@@ -0,0 +1,2 @@
+help: Monitor filtered traffic for the specified pseudo-ethernet interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --filter "${@:7}"
diff --git a/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/node.def b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/node.def
index 8f0fc18..173dee1 100644
--- a/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/node.def
+++ b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/node.def
@@ -1,2 +1,2 @@
-help: Monitor captured traffic on specified pseudo ethernet interface
-run: /opt/vyatta/bin/vyatta-tshark-interface-port.pl "$4"
+help: Montior captured traffic on specified pseudo-ethernet interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4
diff --git a/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/save/node.def b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/save/node.def
new file mode 100644
index 0000000..bd747b5
--- /dev/null
+++ b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/save/node.def
@@ -0,0 +1,2 @@
+help: Save monitored traffic to a file
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --save "${@:7}"
diff --git a/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/unlimited/filter/node.def b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/unlimited/filter/node.def
new file mode 100644
index 0000000..5302dd7
--- /dev/null
+++ b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/unlimited/filter/node.def
@@ -0,0 +1 @@
+help: Monitor filtered traffic for the specified pseudo-ethernet interface
diff --git a/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/unlimited/filter/node.tag/node.def b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/unlimited/filter/node.tag/node.def
new file mode 100644
index 0000000..2b78797
--- /dev/null
+++ b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/unlimited/filter/node.tag/node.def
@@ -0,0 +1,2 @@
+help: Monitor filtered traffic for the specified pseudo-ethernet interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --unlimited --filter "${@:8}"
diff --git a/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/unlimited/node.def b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/unlimited/node.def
new file mode 100644
index 0000000..9202afb
--- /dev/null
+++ b/templates/monitor/interfaces/pseudo-ethernet/node.tag/traffic/unlimited/node.def
@@ -0,0 +1,2 @@
+help: Monitor traffic for the specified pseudo-ethernet interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --unlimited
diff --git a/templates/monitor/interfaces/tunnel/node.tag/node.def b/templates/monitor/interfaces/tunnel/node.tag/node.def
index 777ddb3..49c7bb2 100644
--- a/templates/monitor/interfaces/tunnel/node.tag/node.def
+++ b/templates/monitor/interfaces/tunnel/node.tag/node.def
@@ -1 +1,3 @@
-help: Monitor a specified tunnel interface
+help: Monitor specified tunnel interface
+allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show tunnel
+run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf=""
diff --git a/templates/monitor/interfaces/tunnel/node.tag/traffic/detail/filter/node.def b/templates/monitor/interfaces/tunnel/node.tag/traffic/detail/filter/node.def
new file mode 100644
index 0000000..c3f1bc0
--- /dev/null
+++ b/templates/monitor/interfaces/tunnel/node.tag/traffic/detail/filter/node.def
@@ -0,0 +1 @@
+help: Monitor detailed filtered traffic for the specified tunnel interface
diff --git a/templates/monitor/interfaces/tunnel/node.tag/traffic/detail/filter/node.tag/node.def b/templates/monitor/interfaces/tunnel/node.tag/traffic/detail/filter/node.tag/node.def
new file mode 100644
index 0000000..bc82151
--- /dev/null
+++ b/templates/monitor/interfaces/tunnel/node.tag/traffic/detail/filter/node.tag/node.def
@@ -0,0 +1,2 @@
+help: Monitor detailed filtered traffic for the specified tunnel interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail --filter "${@:8}"
diff --git a/templates/monitor/interfaces/tunnel/node.tag/traffic/detail/node.def b/templates/monitor/interfaces/tunnel/node.tag/traffic/detail/node.def
new file mode 100644
index 0000000..3f87096
--- /dev/null
+++ b/templates/monitor/interfaces/tunnel/node.tag/traffic/detail/node.def
@@ -0,0 +1,2 @@
+help: Monitor detailed traffic for the specified tunnel interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail
diff --git a/templates/monitor/interfaces/tunnel/node.tag/traffic/detail/unlimited/filter/node.def b/templates/monitor/interfaces/tunnel/node.tag/traffic/detail/unlimited/filter/node.def
new file mode 100644
index 0000000..c3f1bc0
--- /dev/null
+++ b/templates/monitor/interfaces/tunnel/node.tag/traffic/detail/unlimited/filter/node.def
@@ -0,0 +1 @@
+help: Monitor detailed filtered traffic for the specified tunnel interface
diff --git a/templates/monitor/interfaces/tunnel/node.tag/traffic/detail/unlimited/filter/node.tag/node.def b/templates/monitor/interfaces/tunnel/node.tag/traffic/detail/unlimited/filter/node.tag/node.def
new file mode 100644
index 0000000..28c770a
--- /dev/null
+++ b/templates/monitor/interfaces/tunnel/node.tag/traffic/detail/unlimited/filter/node.tag/node.def
@@ -0,0 +1,2 @@
+help: Monitor detailed filtered traffic for the specified tunnel interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail --unlimited --filter "${@:9}"
diff --git a/templates/monitor/interfaces/tunnel/node.tag/traffic/detail/unlimited/node.def b/templates/monitor/interfaces/tunnel/node.tag/traffic/detail/unlimited/node.def
new file mode 100644
index 0000000..7c29236
--- /dev/null
+++ b/templates/monitor/interfaces/tunnel/node.tag/traffic/detail/unlimited/node.def
@@ -0,0 +1,2 @@
+help: Monitor detailed traffic for the specified tunnel interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --detail --unlimited
diff --git a/templates/monitor/interfaces/tunnel/node.tag/traffic/filter/node.def b/templates/monitor/interfaces/tunnel/node.tag/traffic/filter/node.def
new file mode 100644
index 0000000..f10ee36
--- /dev/null
+++ b/templates/monitor/interfaces/tunnel/node.tag/traffic/filter/node.def
@@ -0,0 +1 @@
+help: Monitor filtered traffic for the specified tunnel interface
diff --git a/templates/monitor/interfaces/tunnel/node.tag/traffic/filter/node.tag/node.def b/templates/monitor/interfaces/tunnel/node.tag/traffic/filter/node.tag/node.def
new file mode 100644
index 0000000..4863693
--- /dev/null
+++ b/templates/monitor/interfaces/tunnel/node.tag/traffic/filter/node.tag/node.def
@@ -0,0 +1,2 @@
+help: Monitor filtered traffic for the specified tunnel interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --filter "${@:7}"
diff --git a/templates/monitor/interfaces/tunnel/node.tag/traffic/node.def b/templates/monitor/interfaces/tunnel/node.tag/traffic/node.def
index 2f290eb..cc2eb27 100644
--- a/templates/monitor/interfaces/tunnel/node.tag/traffic/node.def
+++ b/templates/monitor/interfaces/tunnel/node.tag/traffic/node.def
@@ -1,2 +1,2 @@
-help: Monitor captured traffic on specified tunnel interface
-run: /opt/vyatta/bin/vyatta-tshark-interface-port.pl "$4"
+help: Montior captured traffic on specified tunnel interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4
diff --git a/templates/monitor/interfaces/tunnel/node.tag/traffic/save/node.def b/templates/monitor/interfaces/tunnel/node.tag/traffic/save/node.def
new file mode 100644
index 0000000..bd747b5
--- /dev/null
+++ b/templates/monitor/interfaces/tunnel/node.tag/traffic/save/node.def
@@ -0,0 +1,2 @@
+help: Save monitored traffic to a file
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --save "${@:7}"
diff --git a/templates/monitor/interfaces/tunnel/node.tag/traffic/unlimited/filter/node.def b/templates/monitor/interfaces/tunnel/node.tag/traffic/unlimited/filter/node.def
new file mode 100644
index 0000000..f10ee36
--- /dev/null
+++ b/templates/monitor/interfaces/tunnel/node.tag/traffic/unlimited/filter/node.def
@@ -0,0 +1 @@
+help: Monitor filtered traffic for the specified tunnel interface
diff --git a/templates/monitor/interfaces/tunnel/node.tag/traffic/unlimited/filter/node.tag/node.def b/templates/monitor/interfaces/tunnel/node.tag/traffic/unlimited/filter/node.tag/node.def
new file mode 100644
index 0000000..e06ac36
--- /dev/null
+++ b/templates/monitor/interfaces/tunnel/node.tag/traffic/unlimited/filter/node.tag/node.def
@@ -0,0 +1,2 @@
+help: Monitor filtered traffic for the specified tunnel interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --unlimited --filter "${@:8}"
diff --git a/templates/monitor/interfaces/tunnel/node.tag/traffic/unlimited/node.def b/templates/monitor/interfaces/tunnel/node.tag/traffic/unlimited/node.def
new file mode 100644
index 0000000..d300bce
--- /dev/null
+++ b/templates/monitor/interfaces/tunnel/node.tag/traffic/unlimited/node.def
@@ -0,0 +1,2 @@
+help: Monitor traffic for the specified tunnel interface
+run: ${vyatta_bindir}/vyatta-tshark.pl --intf $4 --unlimited