[Nagiosplug-help] check_snmp is always 'warning' for me, also.

DKatz at solarcom.com DKatz at solarcom.com
Thu Sep 30 14:08:03 CEST 2004




I inserted printf statements into the code to print the stderr string.  It
named the problem MIB and the line where there was a problem.    The first
one was a recently loaded Nokia MIB.  I removed it.  The second one was
also a Nokia MIB.  I removed all of the Nokia MIBs.  Everything works.

Since the check_snmp program doesn't give any feed back, I would look into
using the snmpget program.  If it returns error strings to check_snmp, I
think it should do the same for the command line.  You may have to use the
-m and -M switches to point it at specific MIBs.  Be sure and use text
based OIDs instead of numeric.  It will force getsnmp to use the MIB.

Just in case you want to try....

The place I put the printf: (Line 327 in nagios-plugins-1.4.0alpha1,
check_snmp.c )

       /* WARNING if output found on stderr */
        if (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_stderr))
                result = max_state (result, STATE_WARNING);

Follow this with:

printf("\n%s\n", input_buffer);

The input_buffer gets whatever is waiting in child_stderr.  The fgets loads
it into the input_buffer.

I guess you could comment out these lines and skip checking for problems in
your MIBs.   It would solve a lot of problems.

Doug Katz
Solarcom, LLC.

e) dkatz at solarcom.com


                                                                           
             Charles Sprickman                                             
             <spork at bway.net>                                              
                                                                        To 
             09/29/2004 03:28          DKatz at solarcom.com                  
             PM                                                         cc 
                                       hmann at itgroundwork.com,             
                                       nagiosplug-help at lists.sourceforge.n 
                                       et                                  
                                                                   Subject 
                                       RE: [Nagiosplug-help] check_snmp is 
                                       always 'warning' for me, also.      
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




On Wed, 29 Sep 2004 DKatz at solarcom.com wrote:

> After diving into the check_snmp.c file, I discovered that it will give a
> WARNING level return code if the snmpget has anything return on stderr.
I
> inserted some printf's into the code to print out the stderr string and
> found out that some of my mibs were not well formatted.  Since I am only
> using mib-2 defined values for monitoring, I removed the offending mibs
> from the mib directory.  Everything works now.

Nice catch...  Is there a CVS version or the plugins package or anything?
I suppose I'd call this a bug.  Now to refresh my own memory on how to vet
all my mibs and ditch the ones that generate complaints.

Thanks,

Charles

>
> Doug Katz
>
>
>
>
>
>
>             DKatz at solarcom.co
>             m
>             Sent by:                                                   To
>             nagiosplug-help-a         <hmann at itgroundwork.com>
>             dmin at lists.source                                          cc
>             forge.net                 nagiosplug-help at lists.sourceforge.n
>                                       et
>                                                                   Subject
>             09/29/2004 08:52          RE: [Nagiosplug-help] check_snmp is
>             AM                        always 'warning' for me, also.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Same thing.  I tried many combinations of limits.  I started with '-w
0:75
> -c 0:85.'   but tried all sorts of patterns including reversing the min
max
> and strange patterns that go against the expected logic.  The critical
> level worked like the documentation says.
>
> If the values do not overlap, such as: '-w 0:74 -c 75:100' then if the
> return is 1, then you would flagged as CRITICAL because it would be
outside
> the Critical range.
>
> One thing I did notice, when the values should have been outside the
> warning range, and the return should be WARNING, the value returned from
> the SNMP call had asterisks preceding and following the value.
>
> For example: 'SNMP   WARNING  -  *10*'
>
> I also checked the return value when the result should have been OK.  It
> was 1.  However, no asterisks.
>
>
> Doug Katz
> Solarcom, LLC.
>
>
>
>
>             "Harper Mann"
>             <hmann at itgroundwo
>             rk.com>                                                    To
>                                       <DKatz at solarcom.com>,
>             09/28/2004 06:50          <nagiosplug-help at lists.sourceforge.
>             PM                        net>
>                                                                        cc
>
>             Please respond to                                     Subject
>             <hmann at itgroundwo         RE: [Nagiosplug-help] check_snmp is
>                  rk.com>              always 'warning' for me, also.
>
>
>
>
>
>
>
>
>
>
> What happens if the warning and critical ranges don't overlap?
>
> - Harper
>
> Harper Mann
> Groundwork Open Source Solutions
> 510-599-2075 (cell)
>
>
> -----Original Message-----
> From: nagiosplug-help-admin at lists.sourceforge.net
> [mailto:nagiosplug-help-admin at lists.sourceforge.net] On Behalf Of
> DKatz at solarcom.com
> Sent: Tuesday, September 28, 2004 1:44 PM
> To: nagiosplug-help at lists.sourceforge.net
> Subject: [Nagiosplug-help] check_snmp is always 'warning' for me, also.
>
>
>
>
>
> I am having the same problem as Charles Sprickman.
>
> I am checking processor usage on a system and it returns a '1' in the
> following command:
>
> dkatz at clmon:/usr/local/nagios/libexec> ./check_snmp -H 10.1.100.201 \
>             -o .1.3.6.1.2.1.25.3.3.1.2.1  -C public -w 0:100 -c 0:100
>
> SNMP WARNING - 1
>
> I have tried all sorts of OIDs and ranges.  I even used the range of:
'0:'
> for both warning and critical.  This string should mean from zero
> to infinity.  My unsigned integer should be in that range.
>
> How do we fix this?
>
> My OS is Suse 9.0.  I just downloaded the latest plugins and compiled
them.
>
> Doug Katz
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
> Use IT products in your business? Tell us what you think of them. Give us
> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out
more
> http://productguide.itmanagersjournal.com/guidepromo.tmpl
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
> Use IT products in your business? Tell us what you think of them. Give us
> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out
more
> http://productguide.itmanagersjournal.com/guidepromo.tmpl
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
> Use IT products in your business? Tell us what you think of them. Give us
> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out
more
> http://productguide.itmanagersjournal.com/guidepromo.tmpl
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>






More information about the Help mailing list