check_ifstatus plugin help

Subhendu Ghosh sghosh at sghosh.org
Wed Oct 8 06:02:52 CEST 2003


On Mon, 6 Oct 2003, Starr, Neal (CCI-Wichita) wrote:

What version of the plugins? of Net::SNMP?

> 
> I have been taking a look at using the check_ifstatus plugin for Nagios
> against several hosts in my network.  I'm currently running Nagios 1.1
> on a Solaris 9 platform (SunFire 280R).
> 
> The first problem I encountered is on with a couple of CMTS devices in
> my network, I get the following error message if I try using version 2c
> of SNMP with the plugin:
> 
> CRITICAL: Message size exceeded buffer maxMsgSize for
> 1.3.6.1.2.1.2.2.1.2 with snmp version 2
> 
> Has anyone seen this before, and if so how can I correct?  Here is an
> example of the kind of data I believe is causing the problem:
> 
> .1.3.6.1.2.1.2.2.1.2.10092546 = STRING: HFC Downstream: Broadcom BCM3033 on chassis 1, slot 6, port 2


first time I've seen the message - the default maxmsgsize is 1472 bytes 
which seems to work for most folks...  We can add a option to increase the 
maxmsgsize when creating the session...

a quick workaround would be a to add the following at line 165 
(create a v1/v2 session)

  -maxmsgsize => 2048;  # adjust according to preference (max is 2^32-1)

This seems to be an issue with either v1 or v2c but not v3 as maxmsgsize 
is negotiated automatically for v3.

> 
> I only get this warning when using SNMP v2c with the CMTSs in my
> network.  Other devices seem to have much shorter strings.  The only way
> I can avoid getting this message with these devices is to use SNMP v1
> instead, and then I run into the problem below.
> 
> 
> Now, if the plugin does not find any down interfaces, everything works
> just fine.  However, if there is one or more down interfaces, when the
> plugin returns its data I get messages of the following for each down
> interface that was seen:
> 
> Use of uninitialized value in sprintf at ./check_ifstatus line 194. Use
> of uninitialized value in sprintf at ./check_ifstatus line 194.
> CRITICAL: host '172.26.49.100', interfaces up: 11, down: 2, dormant:
> 0<BR>fbus:3: down -> <BR>fbus:4: down -> <BR>
> 
> When looking at the source for the plugin, it appears to be in here:
> 
> $ifmessage .= sprintf("%s: down -> %s<BR>",
>                                  $ifStatus{$key}{$snmpIfDescr},
>                                                                  $ifStatus{$key}{$snmpIfName});

This was fixed in the last release ...

> 
> Which appears in a for structure for looping through each of the down
> interfaces and printing a message about them.  My guess is that one or
> the other or both of the variables for storing ifDescr and ifName are
> coming back empty.  Is there a way to find out why?  When I walk those
> MIBs manually using Net-SNMP I'm not seeing a problem.  Any suggestions
> would be greatly appreciated.  Thanks.
> 


-- 

-sg



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list