[Nagiosplug-devel] Patch for check_snmp.c

Jackson Sie jsie at quadrix.com
Thu Aug 1 09:23:21 CEST 2002


Thanks for the patch Andrew!  Definitely useful for our environment (you
know debugging info and such...)  IMHO, have you thought about providing
for this functionality as a command line switch?


Jackson Sie
Senior Architect
Quadrix Solutions, Inc.


-----Original Message-----
From: nagiosplug-devel-admin at lists.sourceforge.net
[mailto:nagiosplug-devel-admin at lists.sourceforge.net] On Behalf Of
Mayhew, Andrew
Sent: Wednesday, July 31, 2002 5:54 PM
To: 'nagiosplug-devel at lists.sourceforge.net'
Subject: [Nagiosplug-devel] Patch for check_snmp.c


Don't know if anyone else particularly cares, but for our environment we
like to get the full response from the SNMP get even if the status is
OK. So this patch changes the output behaviour slightly to make it
slightly more consistent in this regard.

Share and enjoy.
--Andrew Mayhew <amayhew at verisign.com>

*** check_snmp.c        Wed Feb 27 22:42:59 2002
--- check_snmp.c-new    Wed Jul 31 14:44:27 2002
***************
*** 220,226 ****
                        p2 = strpbrk (p2, "0123456789");
                        response_value[i] = strtoul (p2, NULL, 10);
                        iresult = check_num (i);
!                       show = ssprintf (show, "%d", response_value[i]);
                }
  
                else if (eval_method[i] & CRIT_STRING) {
--- 220,227 ----
                        p2 = strpbrk (p2, "0123456789");
                        response_value[i] = strtoul (p2, NULL, 10);
                        iresult = check_num (i);
!                       /* For consistency we want the full SNMP
response
every time. */
!                       show = ssprintf (show, "%s", response);
                }
  
                else if (eval_method[i] & CRIT_STRING) {
***************
*** 291,297 ****
        /* WARNING if output found on stderr */
        if (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_stderr))
                result = max (result, STATE_WARNING);
- 
        /* close stderr */
        (void) fclose (child_stderr);
  
--- 292,297 ----


-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
_______________________________________________
Nagiosplug-devel mailing list Nagiosplug-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel





More information about the Devel mailing list