[Nagiosplug-checkins] CVS: nagiosplug/plugins check_snmp.c,1.17,1.18
Karl DeBisschop
kdebisschop at users.sourceforge.net
Thu Nov 14 22:28:05 CET 2002
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory usw-pr-cvs1:/tmp/cvs-serv12732/plugins
Modified Files:
check_snmp.c
Log Message:
fix label handling, replace accidentally deleted elseif l.310
Index: check_snmp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_snmp.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** check_snmp.c 11 Nov 2002 22:15:55 -0000 1.17
--- check_snmp.c 15 Nov 2002 00:50:19 -0000 1.18
***************
*** 298,301 ****
--- 298,303 ----
else if (strstr (response, "Gauge32: "))
show = strstr (response, "Gauge32: ") + 9;
+ else if (strstr (response, "INTEGER: "))
+ show = strstr (response, "INTEGER: ") + 9;
else
show = response;
***************
*** 311,324 ****
if (eval_method[i] & CRIT_GT ||
! eval_method[i] & CRIT_LT ||
! eval_method[i] & CRIT_GE ||
! eval_method[i] & CRIT_LE ||
! eval_method[i] & CRIT_EQ ||
! eval_method[i] & CRIT_NE ||
! eval_method[i] & WARN_GT ||
! eval_method[i] & WARN_LT ||
! eval_method[i] & WARN_GE ||
! eval_method[i] & WARN_LE ||
! eval_method[i] & WARN_EQ || eval_method[i] & WARN_NE) {
p2 = strpbrk (p2, "0123456789");
response_value[i] = strtoul (p2, NULL, 10);
--- 313,327 ----
if (eval_method[i] & CRIT_GT ||
! eval_method[i] & CRIT_LT ||
! eval_method[i] & CRIT_GE ||
! eval_method[i] & CRIT_LE ||
! eval_method[i] & CRIT_EQ ||
! eval_method[i] & CRIT_NE ||
! eval_method[i] & WARN_GT ||
! eval_method[i] & WARN_LT ||
! eval_method[i] & WARN_GE ||
! eval_method[i] & WARN_LE ||
! eval_method[i] & WARN_EQ ||
! eval_method[i] & WARN_NE) {
p2 = strpbrk (p2, "0123456789");
response_value[i] = strtoul (p2, NULL, 10);
***************
*** 359,363 ****
else if (eval_method[i] & CRIT_PRESENT)
iresult = STATE_CRITICAL;
! else
iresult = STATE_WARNING;
--- 362,366 ----
else if (eval_method[i] & CRIT_PRESENT)
iresult = STATE_CRITICAL;
! else if (eval_method[i] & WARN_PRESENT)
iresult = STATE_WARNING;
***************
*** 377,381 ****
i++;
! } /* end while */
if (found == 0)
--- 380,384 ----
i++;
! } /* end while (ptr) */
if (found == 0)
***************
*** 396,403 ****
result = max_state (result, STATE_WARNING);
! if (nunits > 0)
! printf ("%s %s -%s %s\n", label, state_text (result), outbuff, units);
! else
! printf ("%s %s -%s\n", label, state_text (result), outbuff);
return result;
--- 399,406 ----
result = max_state (result, STATE_WARNING);
! /* if (nunits == 1 || i == 1) */
! /* printf ("%s %s -%s %s\n", label, state_text (result), outbuff, units); */
! /* else */
! printf ("%s %s -%s\n", label, state_text (result), outbuff);
return result;
More information about the Commits
mailing list