aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Subhendu Ghosh <sghosh@users.sourceforge.net> 2005-05-25 03:23:19 +0000
committerGravatar Subhendu Ghosh <sghosh@users.sourceforge.net> 2005-05-25 03:23:19 +0000
commit1c13d632b4a3b4cc0f11ba4cad6de0c3f799a26c (patch)
treed4c21eb1e14c49732948be49932993afc01c9dfc
parent4e19425ce697ce17257b0db904a656e3c8557911 (diff)
downloadmonitoring-plugins-1c13d632b4a3b4cc0f11ba4cad6de0c3f799a26c.tar.gz
v2c support - 1155754
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1178 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--plugins/check_snmp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index d66d834e..5d65113f 100644
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
@@ -659,6 +659,9 @@ validate_arguments ()
asprintf(&proto, DEFAULT_PROTOCOL);
asprintf(&authpriv, "%s%s", "-c ", community);
}
+ else if ( strcmp (proto, "2c") == 0 ) { /* snmpv2c args */
+ asprintf(&authpriv, "%s%s", "-c ", community);
+ }
else if ( strcmp (proto, "3") == 0 ) { /* snmpv3 args */
asprintf(&proto, "%s", "3");
@@ -872,7 +875,7 @@ Check status of remote machines and obtain sustem information via SNMP\n\n"));
/* SNMP and Authentication Protocol */
printf (_("\
- -P, --protocol=[1|3]\n\
+ -P, --protocol=[1|2c|3]\n\
SNMP protocol version\n\
-L, --seclevel=[noAuthNoPriv|authNoPriv|authPriv]\n\
SNMPv3 securityLevel\n\