Imported Upstream version 2.0
This commit is contained in:
parent
c89ccc3c74
commit
0841b5c7c7
165 changed files with 25440 additions and 4442 deletions
|
@ -1,9 +1,9 @@
|
|||
/*****************************************************************************
|
||||
*
|
||||
* Nagios check_snmp plugin
|
||||
* Monitoring check_snmp plugin
|
||||
*
|
||||
* License: GPL
|
||||
* Copyright (c) 1999-2007 Nagios Plugins Development Team
|
||||
* Copyright (c) 1999-2007 Monitoring Plugins Development Team
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
const char *progname = "check_snmp";
|
||||
const char *copyright = "1999-2007";
|
||||
const char *email = "nagiosplug-devel@lists.sourceforge.net";
|
||||
const char *email = "devel@monitoring-plugins.org";
|
||||
|
||||
#include "common.h"
|
||||
#include "runcmd.h"
|
||||
|
@ -459,7 +459,7 @@ main (int argc, char **argv)
|
|||
/* Process this block for numeric comparisons */
|
||||
/* Make some special values,like Timeticks numeric only if a threshold is defined */
|
||||
if (thlds[i]->warning || thlds[i]->critical || calculate_rate) {
|
||||
ptr = strpbrk (show, "0123456789");
|
||||
ptr = strpbrk (show, "-0123456789");
|
||||
if (ptr == NULL)
|
||||
die (STATE_UNKNOWN,_("No valid data returned (%s)\n"), show);
|
||||
while (i >= response_size) {
|
||||
|
@ -963,11 +963,16 @@ validate_arguments ()
|
|||
if (seclevel == NULL)
|
||||
xasprintf(&seclevel, "noAuthNoPriv");
|
||||
|
||||
if (secname == NULL)
|
||||
die(STATE_UNKNOWN, _("Required parameter: %s\n"), "secname");
|
||||
|
||||
if (strcmp(seclevel, "noAuthNoPriv") == 0) {
|
||||
numauthpriv = 2;
|
||||
numauthpriv = 4;
|
||||
authpriv = calloc (numauthpriv, sizeof (char *));
|
||||
authpriv[0] = strdup ("-l");
|
||||
authpriv[1] = strdup ("noAuthNoPriv");
|
||||
authpriv[2] = strdup ("-u");
|
||||
authpriv[3] = strdup (secname);
|
||||
} else {
|
||||
if (! ( (strcmp(seclevel, "authNoPriv")==0) || (strcmp(seclevel, "authPriv")==0) ) ) {
|
||||
usage2 (_("Invalid seclevel"), seclevel);
|
||||
|
@ -976,9 +981,6 @@ validate_arguments ()
|
|||
if (authproto == NULL )
|
||||
xasprintf(&authproto, DEFAULT_AUTH_PROTOCOL);
|
||||
|
||||
if (secname == NULL)
|
||||
die(STATE_UNKNOWN, _("Required parameter: %s\n"), "secname");
|
||||
|
||||
if (authpasswd == NULL)
|
||||
die(STATE_UNKNOWN, _("Required parameter: %s\n"), "authpasswd");
|
||||
|
||||
|
@ -1160,7 +1162,7 @@ print_help (void)
|
|||
printf (" %s\n", "-D, --output-delimiter=STRING");
|
||||
printf (" %s\n", _("Separates output on multiple OID requests"));
|
||||
|
||||
printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
|
||||
printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
|
||||
printf (" %s\n", "-e, --retries=INTEGER");
|
||||
printf (" %s\n", _("Number of retries to be used in the requests"));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue