summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2012-02-22 23:52:37 +0000
committerJohn Southworth <john.southworth@vyatta.com>2012-02-22 23:52:37 +0000
commit2959de736d3b72c171115e150f15bc3c55e4c2fd (patch)
treed531222894dbd647ce3136b470e034ca53080c5a
parent8fe842931ce7f9bf2f2001797722439b417e4586 (diff)
downloadvyatta-op-2959de736d3b72c171115e150f15bc3c55e4c2fd.tar.gz
vyatta-op-2959de736d3b72c171115e150f15bc3c55e4c2fd.zip
Bugfix 4053: implement bandwidth utilization montior commands 'mon int <type> <name>'; 'mon int <type> <name> flow'
-rw-r--r--templates/monitor/interfaces/bonding/node.def1
-rw-r--r--templates/monitor/interfaces/bonding/node.tag/flow/node.def2
-rw-r--r--templates/monitor/interfaces/bonding/node.tag/node.def2
-rw-r--r--templates/monitor/interfaces/bonding/node.tag/vif/node.def1
-rw-r--r--templates/monitor/interfaces/bonding/node.tag/vif/node.tag/flow/node.def2
-rw-r--r--templates/monitor/interfaces/bonding/node.tag/vif/node.tag/node.def1
-rw-r--r--templates/monitor/interfaces/bridge/node.def1
-rw-r--r--templates/monitor/interfaces/bridge/node.tag/flow/node.def2
-rw-r--r--templates/monitor/interfaces/bridge/node.tag/node.def1
-rw-r--r--templates/monitor/interfaces/ethernet/node.def1
-rw-r--r--templates/monitor/interfaces/ethernet/node.tag/flow/node.def2
-rw-r--r--templates/monitor/interfaces/ethernet/node.tag/node.def1
-rw-r--r--templates/monitor/interfaces/ethernet/node.tag/vif/node.def1
-rw-r--r--templates/monitor/interfaces/ethernet/node.tag/vif/node.tag/flow/node.def2
-rw-r--r--templates/monitor/interfaces/ethernet/node.tag/vif/node.tag/node.def1
-rw-r--r--templates/monitor/interfaces/loopback/node.def1
-rw-r--r--templates/monitor/interfaces/loopback/node.tag/flow/node.def2
-rw-r--r--templates/monitor/interfaces/pseudo-ethernet/node.def1
-rw-r--r--templates/monitor/interfaces/pseudo-ethernet/node.tag/flow/node.def2
-rw-r--r--templates/monitor/interfaces/pseudo-ethernet/node.tag/node.def1
-rw-r--r--templates/monitor/interfaces/tunnel/node.def1
-rw-r--r--templates/monitor/interfaces/tunnel/node.tag/flow/node.def2
-rw-r--r--templates/monitor/interfaces/tunnel/node.tag/node.def1
-rw-r--r--templates/monitor/interfaces/vrrp/node.def1
-rw-r--r--templates/monitor/interfaces/vrrp/node.tag/flow/node.def2
-rw-r--r--templates/monitor/interfaces/vrrp/node.tag/node.def1
26 files changed, 35 insertions, 1 deletions
diff --git a/templates/monitor/interfaces/bonding/node.def b/templates/monitor/interfaces/bonding/node.def
index 16f3822..b7e8bce 100644
--- a/templates/monitor/interfaces/bonding/node.def
+++ b/templates/monitor/interfaces/bonding/node.def
@@ -1 +1,2 @@
help: Monitor a bonding interface
+run: bmon -p bond*,!bond*v*,!bond*.*
diff --git a/templates/monitor/interfaces/bonding/node.tag/flow/node.def b/templates/monitor/interfaces/bonding/node.tag/flow/node.def
new file mode 100644
index 0000000..2dd7cfd
--- /dev/null
+++ b/templates/monitor/interfaces/bonding/node.tag/flow/node.def
@@ -0,0 +1,2 @@
+help: Monitor flows on specified interface
+run: sudo /usr/sbin/iftop -i $4
diff --git a/templates/monitor/interfaces/bonding/node.tag/node.def b/templates/monitor/interfaces/bonding/node.tag/node.def
index 5689cd2..a52d23e 100644
--- a/templates/monitor/interfaces/bonding/node.tag/node.def
+++ b/templates/monitor/interfaces/bonding/node.tag/node.def
@@ -1,3 +1,3 @@
help: Monitor specified bonding interface
allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show bonding
-
+run: bmon -p $4
diff --git a/templates/monitor/interfaces/bonding/node.tag/vif/node.def b/templates/monitor/interfaces/bonding/node.tag/vif/node.def
index 67db353..4241bc8 100644
--- a/templates/monitor/interfaces/bonding/node.tag/vif/node.def
+++ b/templates/monitor/interfaces/bonding/node.tag/vif/node.def
@@ -1 +1,2 @@
help: Monitor a vif
+run: bmon -p $4.*
diff --git a/templates/monitor/interfaces/bonding/node.tag/vif/node.tag/flow/node.def b/templates/monitor/interfaces/bonding/node.tag/vif/node.tag/flow/node.def
new file mode 100644
index 0000000..8631626
--- /dev/null
+++ b/templates/monitor/interfaces/bonding/node.tag/vif/node.tag/flow/node.def
@@ -0,0 +1,2 @@
+help: Monitor flows on specified interface
+run: sudo /usr/sbin/iftop -i $4.$6
diff --git a/templates/monitor/interfaces/bonding/node.tag/vif/node.tag/node.def b/templates/monitor/interfaces/bonding/node.tag/vif/node.tag/node.def
index 89ac434..4ca53db 100644
--- a/templates/monitor/interfaces/bonding/node.tag/vif/node.tag/node.def
+++ b/templates/monitor/interfaces/bonding/node.tag/vif/node.tag/node.def
@@ -1,2 +1,3 @@
help: Monitor specified bonding interface
allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show bonding --vif ${COMP_WORDS[COMP_CWORD-2]}
+run: bmon -p $4.$6
diff --git a/templates/monitor/interfaces/bridge/node.def b/templates/monitor/interfaces/bridge/node.def
index 347c0f2..5b2a395 100644
--- a/templates/monitor/interfaces/bridge/node.def
+++ b/templates/monitor/interfaces/bridge/node.def
@@ -1 +1,2 @@
help: Monitor a bridge interface
+run: bmon -p br*
diff --git a/templates/monitor/interfaces/bridge/node.tag/flow/node.def b/templates/monitor/interfaces/bridge/node.tag/flow/node.def
new file mode 100644
index 0000000..2dd7cfd
--- /dev/null
+++ b/templates/monitor/interfaces/bridge/node.tag/flow/node.def
@@ -0,0 +1,2 @@
+help: Monitor flows on specified interface
+run: sudo /usr/sbin/iftop -i $4
diff --git a/templates/monitor/interfaces/bridge/node.tag/node.def b/templates/monitor/interfaces/bridge/node.tag/node.def
index 6b72aa4..317283f 100644
--- a/templates/monitor/interfaces/bridge/node.tag/node.def
+++ b/templates/monitor/interfaces/bridge/node.tag/node.def
@@ -1,3 +1,4 @@
help: Monitor specified bridge interface
allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show bridge
+run: bmon -p $4
diff --git a/templates/monitor/interfaces/ethernet/node.def b/templates/monitor/interfaces/ethernet/node.def
index d720c00..60c4970 100644
--- a/templates/monitor/interfaces/ethernet/node.def
+++ b/templates/monitor/interfaces/ethernet/node.def
@@ -1 +1,2 @@
help: Monitor a ethernet interface
+run: bmon -p eth*,!eth*v*,!eth*.*
diff --git a/templates/monitor/interfaces/ethernet/node.tag/flow/node.def b/templates/monitor/interfaces/ethernet/node.tag/flow/node.def
new file mode 100644
index 0000000..2dd7cfd
--- /dev/null
+++ b/templates/monitor/interfaces/ethernet/node.tag/flow/node.def
@@ -0,0 +1,2 @@
+help: Monitor flows on specified interface
+run: sudo /usr/sbin/iftop -i $4
diff --git a/templates/monitor/interfaces/ethernet/node.tag/node.def b/templates/monitor/interfaces/ethernet/node.tag/node.def
index 74ce2fe..1953e99 100644
--- a/templates/monitor/interfaces/ethernet/node.tag/node.def
+++ b/templates/monitor/interfaces/ethernet/node.tag/node.def
@@ -1,3 +1,4 @@
help: Monitor specified ethernet interface
allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show ethernet
+run: bmon -p $4
diff --git a/templates/monitor/interfaces/ethernet/node.tag/vif/node.def b/templates/monitor/interfaces/ethernet/node.tag/vif/node.def
index 67db353..4241bc8 100644
--- a/templates/monitor/interfaces/ethernet/node.tag/vif/node.def
+++ b/templates/monitor/interfaces/ethernet/node.tag/vif/node.def
@@ -1 +1,2 @@
help: Monitor a vif
+run: bmon -p $4.*
diff --git a/templates/monitor/interfaces/ethernet/node.tag/vif/node.tag/flow/node.def b/templates/monitor/interfaces/ethernet/node.tag/vif/node.tag/flow/node.def
new file mode 100644
index 0000000..8631626
--- /dev/null
+++ b/templates/monitor/interfaces/ethernet/node.tag/vif/node.tag/flow/node.def
@@ -0,0 +1,2 @@
+help: Monitor flows on specified interface
+run: sudo /usr/sbin/iftop -i $4.$6
diff --git a/templates/monitor/interfaces/ethernet/node.tag/vif/node.tag/node.def b/templates/monitor/interfaces/ethernet/node.tag/vif/node.tag/node.def
index b353293..43cd0b0 100644
--- a/templates/monitor/interfaces/ethernet/node.tag/vif/node.tag/node.def
+++ b/templates/monitor/interfaces/ethernet/node.tag/vif/node.tag/node.def
@@ -1,2 +1,3 @@
help: Monitor specified ethernet interface
allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show ethernet --vif ${COMP_WORDS[COMP_CWORD-2]}
+run: bmon -p $4.$6
diff --git a/templates/monitor/interfaces/loopback/node.def b/templates/monitor/interfaces/loopback/node.def
index 5266ca3..9d3a8a5 100644
--- a/templates/monitor/interfaces/loopback/node.def
+++ b/templates/monitor/interfaces/loopback/node.def
@@ -1 +1,2 @@
help: Monitor a loopback interface
+run: bmon -p lo
diff --git a/templates/monitor/interfaces/loopback/node.tag/flow/node.def b/templates/monitor/interfaces/loopback/node.tag/flow/node.def
new file mode 100644
index 0000000..2dd7cfd
--- /dev/null
+++ b/templates/monitor/interfaces/loopback/node.tag/flow/node.def
@@ -0,0 +1,2 @@
+help: Monitor flows on specified interface
+run: sudo /usr/sbin/iftop -i $4
diff --git a/templates/monitor/interfaces/pseudo-ethernet/node.def b/templates/monitor/interfaces/pseudo-ethernet/node.def
index c51a6f8..8cd18c9 100644
--- a/templates/monitor/interfaces/pseudo-ethernet/node.def
+++ b/templates/monitor/interfaces/pseudo-ethernet/node.def
@@ -1 +1,2 @@
help: Monitor a pseudo-ethernet interface
+run: bmon -p peth*
diff --git a/templates/monitor/interfaces/pseudo-ethernet/node.tag/flow/node.def b/templates/monitor/interfaces/pseudo-ethernet/node.tag/flow/node.def
new file mode 100644
index 0000000..2dd7cfd
--- /dev/null
+++ b/templates/monitor/interfaces/pseudo-ethernet/node.tag/flow/node.def
@@ -0,0 +1,2 @@
+help: Monitor flows on specified interface
+run: sudo /usr/sbin/iftop -i $4
diff --git a/templates/monitor/interfaces/pseudo-ethernet/node.tag/node.def b/templates/monitor/interfaces/pseudo-ethernet/node.tag/node.def
index 577f079..b58a595 100644
--- a/templates/monitor/interfaces/pseudo-ethernet/node.tag/node.def
+++ b/templates/monitor/interfaces/pseudo-ethernet/node.tag/node.def
@@ -1,3 +1,4 @@
help: Monitor specified pseudo-ethernet interface
allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show pseudo-ethernet
+run: bmon -p $4
diff --git a/templates/monitor/interfaces/tunnel/node.def b/templates/monitor/interfaces/tunnel/node.def
index ca86e58..a41faa2 100644
--- a/templates/monitor/interfaces/tunnel/node.def
+++ b/templates/monitor/interfaces/tunnel/node.def
@@ -1 +1,2 @@
help: Monitor a tunnel interface
+run: bmon -p tun*
diff --git a/templates/monitor/interfaces/tunnel/node.tag/flow/node.def b/templates/monitor/interfaces/tunnel/node.tag/flow/node.def
new file mode 100644
index 0000000..2dd7cfd
--- /dev/null
+++ b/templates/monitor/interfaces/tunnel/node.tag/flow/node.def
@@ -0,0 +1,2 @@
+help: Monitor flows on specified interface
+run: sudo /usr/sbin/iftop -i $4
diff --git a/templates/monitor/interfaces/tunnel/node.tag/node.def b/templates/monitor/interfaces/tunnel/node.tag/node.def
index df030cb..00cd040 100644
--- a/templates/monitor/interfaces/tunnel/node.tag/node.def
+++ b/templates/monitor/interfaces/tunnel/node.tag/node.def
@@ -1,3 +1,4 @@
help: Monitor specified tunnel interface
allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show tunnel
+run: bmon -p $4
diff --git a/templates/monitor/interfaces/vrrp/node.def b/templates/monitor/interfaces/vrrp/node.def
index d82910e..64c6684 100644
--- a/templates/monitor/interfaces/vrrp/node.def
+++ b/templates/monitor/interfaces/vrrp/node.def
@@ -1 +1,2 @@
help: Monitor a vrrp interface
+run: bmon -p eth*v*,bond*v*
diff --git a/templates/monitor/interfaces/vrrp/node.tag/flow/node.def b/templates/monitor/interfaces/vrrp/node.tag/flow/node.def
new file mode 100644
index 0000000..2dd7cfd
--- /dev/null
+++ b/templates/monitor/interfaces/vrrp/node.tag/flow/node.def
@@ -0,0 +1,2 @@
+help: Monitor flows on specified interface
+run: sudo /usr/sbin/iftop -i $4
diff --git a/templates/monitor/interfaces/vrrp/node.tag/node.def b/templates/monitor/interfaces/vrrp/node.tag/node.def
index 48cb5af..043cc89 100644
--- a/templates/monitor/interfaces/vrrp/node.tag/node.def
+++ b/templates/monitor/interfaces/vrrp/node.tag/node.def
@@ -1,3 +1,4 @@
help: Monitor specified vrrp interface
allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show vrrp
+run: bmon -p $4