From e262024889614e1e20718497ff03eb88efaecc2b Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 9 Nov 2010 16:23:40 -0800 Subject: Enhance show snmp command Resolve usability issues with 'show snmp' by adding some more control 1. show snmp -- find usable community for loopback 2. show snmp community -- check connectivity 3. show snmp community host -- check remote connectivity --- templates/show/snmp/community/node.def | 1 + templates/show/snmp/community/node.tag/host/node.def | 2 ++ templates/show/snmp/community/node.tag/host/node.tag/node.def | 3 +++ templates/show/snmp/community/node.tag/node.def | 3 +++ templates/show/snmp/node.def | 2 +- 5 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 templates/show/snmp/community/node.def create mode 100644 templates/show/snmp/community/node.tag/host/node.def create mode 100644 templates/show/snmp/community/node.tag/host/node.tag/node.def create mode 100644 templates/show/snmp/community/node.tag/node.def (limited to 'templates') diff --git a/templates/show/snmp/community/node.def b/templates/show/snmp/community/node.def new file mode 100644 index 0000000..48e7d1d --- /dev/null +++ b/templates/show/snmp/community/node.def @@ -0,0 +1 @@ +help: Show status of SNMP community diff --git a/templates/show/snmp/community/node.tag/host/node.def b/templates/show/snmp/community/node.tag/host/node.def new file mode 100644 index 0000000..ac7e559 --- /dev/null +++ b/templates/show/snmp/community/node.tag/host/node.def @@ -0,0 +1,2 @@ +help: Show status of SNMP on remote host + diff --git a/templates/show/snmp/community/node.tag/host/node.tag/node.def b/templates/show/snmp/community/node.tag/host/node.tag/node.def new file mode 100644 index 0000000..b20409d --- /dev/null +++ b/templates/show/snmp/community/node.tag/host/node.tag/node.def @@ -0,0 +1,3 @@ +help: Show status of SNMP on specified host +allowed: echo -n ' ' +run: ${vyatta_bindir}/vyatta-show-snmp.pl --community $4 --host $6 diff --git a/templates/show/snmp/community/node.tag/node.def b/templates/show/snmp/community/node.tag/node.def new file mode 100644 index 0000000..48aa6ad --- /dev/null +++ b/templates/show/snmp/community/node.tag/node.def @@ -0,0 +1,3 @@ +help: Show status of specified SNMP community +allowed: ${vyatta_bindir}/vyatta-show-snmp.pl --allowed +run: ${vyatta_bindir}/vyatta-show-snmp.pl --community="$4" diff --git a/templates/show/snmp/node.def b/templates/show/snmp/node.def index ea8ca47..98f4366 100644 --- a/templates/show/snmp/node.def +++ b/templates/show/snmp/node.def @@ -1,2 +1,2 @@ -help: Show SNMP status +help: Show status of SNMP on localhost run: ${vyatta_bindir}/vyatta-show-snmp.pl -- cgit v1.2.3