Check_ifstatus / SNMP.pm problems

Troy Corbin troyc at communitech.net
Wed Oct 9 21:31:10 CEST 2002


subhendu-

ive just tested with the check_ifstatus from the contrib dir of the newest
nagios plugins tarball, and same error:

Use of uninitialized value in sprintf at ./check_ifstatus2.pl line 148.

What could be causing this?

-troy


On Tue, 8 Oct 2002, Subhendu Ghosh wrote:

> 
> What plugin version are you using?
> 
> -sg
> 
> On Mon, 7 Oct 2002, Troy Corbin wrote:
> 
> > i too use the check_ifstatus plugin for a majority of my router
> > monitoring. on routers that have an interface that is down, i receive the
> > following error if run manually:
> > 
> > mon# ./check_ifstatus -c funkychicken 10.202.69.69
> > Use of uninitialized value in sprintf at ./check_ifstatus line 148.
> > Use of uninitialized value in sprintf at ./check_ifstatus line 148.
> > Use of uninitialized value in sprintf at ./check_ifstatus line 148.
> > Use of uninitialized value in sprintf at ./check_ifstatus line 148.
> > Use of uninitialized value in sprintf at ./check_ifstatus line 148.
> > 
> > What is causing this? The box runs Fbsd 4.6-Stable.
> > 
> > Also, does anyone know of a way to filter interfaces, ie BRI or PRIs?
> > 
> > Thanks,
> > troy
> > 
> > 
> > 
> > On Mon, 7 Oct 2002, Nolan Martin wrote:
> > 
> > > * The check_ifstatus perl script (unchanged) references /usr/bin/perl
> > > * Perl is located in the /usr/bin directory
> > > * echo $PATH shows /usr/bin listed
> > > * # perl -v and # /usr/bin/perl -v both find perl and show version
> > > v5.6.1
> > > 
> > > Thanks again for your assistance.  
> > > 
> > > Nolan
> > > 
> > > >>> Subhendu Ghosh <sghosh at sghosh.org> 10/05/02 09:30AM >>>
> > > 
> > > Check the location for perl in your path versus the perl in the #! 
> > > statement. (or config.status if using embedded perl)
> > > 
> > > -sg
> > > 
> > > On Fri, 4 Oct 2002, Nolan Martin wrote:
> > > 
> > > > Well, okay, I did confuse SNMP.pm for the Net::SNMP perl module.  :)
> > > > 
> > > > I would say this was largely because the first time I ran a
> > > > check_ifstatus, it complained about not having the SNMP.pm in its
> > > @INC
> > > > path....  Once I adjusted it so that it was in its path, that error
> > > went
> > > > away.  I then received the session error message....
> > > > 
> > > > But, as I mentioned, based on one of your postings in the archives,
> > > I
> > > > separately attempted to install the Net::SNMP through the CPAN shell
> > > and
> > > > received a response that Net::SNMP is up to date ( perl -MCPAN -e
> > > > "install Net::SNMP").  So, if I understand correctly, Net::SNMP is
> > > > installed on the machine.
> > > > 
> > > > Thoughts or suggestions as to what I am missing or misunderstanding?
> > > 
> > > > Thanks for your response.
> > > > 
> > > > Nolan
> > > > 
> > > > 
> > > > >>> Subhendu Ghosh <sghosh at sghosh.org> 10/04/02 02:38PM >>>
> > > > Ummm yes and no :)
> > > > 
> > > > NET-SNMP package includes the snmp command line utilities used by 
> > > > check_snmp and the SNMP.pm module.
> > > > 
> > > > check_ifstatus and friends require Net::SNMP module -which is an all
> > > > perl 
> > > > snmp manager library implementation.
> > > > 
> > > > the names are confusing similar...  the perl modules names are
> > > actually
> > > > 
> > > > different.
> > > > 
> > > > -sg
> > > > 
> > > > On Fri, 4 Oct 2002, Nolan Martin wrote:
> > > > 
> > > > > I am trying to get check_ifstatus going and am having some
> > > > difficulties
> > > > > getting NET-SNMP and the Perl SNMP module configured properly.  
> > > > > 
> > > > > I have installed both NET-SNMP and the SNMP.pm, but I still
> > > receive
> > > > the
> > > > > following error message, when I attempt to run the check_ifstatus
> > > > > command from the nagios libexec directory to test it:
> > > > > 
> > > > > # ./check_ifstatus -H 10.5.1.11
> > > > > Can't locate object method "session" via package "Net::SNMP"
> > > > (perhaps
> > > > > you forgot to load "Net::SNMP"?) at ./check_ifstatus line 128.
> > > > > 
> > > > > As I mentioned, I installed NET-SNMP and installed the SNMP perl
> > > > module
> > > > > following the instructions that accompany both of those components.
> > > 
> > > > I
> > > > > also followed Subhendu Ghosh's postings from August 21st (RE:
> > > > > [Nagios-users] SNMP.pm Solution/problem) and attempted to install
> > > > > again/verify my perl module installation by installing it using
> > > the
> > > > CPAN
> > > > > shell.  That attempt returns that Net::SNMP is up to date.
> > > > > 
> > > > > Obviously, I missed some step or have failed to do some
> > > > configuration. 
> > > > > Any assistance would be appreciated. 
> > > > > 
> > > > > My system is Red Hat 7.3.  I am running Perl 5.6.1, although there
> > > > > appears to be an existing 5.6.0 installation as well.  I am using
> > > > the
> > > > > Nagios Plugins v1.3 Beta1 plugins and the latest version of
> > > Net-SNMP
> > > > > 5.0.5 (released 10/1/2002)
> > > > > 
> > > > > Here are the steps I went through.
> > > > > 
> > > > > INSTALLED NET-SNMP
> > > > > * Downloaded and extracted Net-SNMP 5.0.5
> > > > > * ./configure
> > > > > * make
> > > > > * umask 022
> > > > > * make install
> > > > > 
> > > > > INSTALLED / VERIFIED PERL SNMP MODULE
> > > > > * From the perl subdirectory of the extracted NET-SNMP directory,
> > > > ran: 
> > > > > perl Makefile.PL
> > > > > * make
> > > > > * make test
> > > > > * make install
> > > > > * Since the SNMP.pm was installed to
> > > > > /usr/lib/perl5/site_perl/5.6.1/i386-linux, but my understanding
> > > was
> > > > that
> > > > > NET-SNMP actually looks for it under a directory named Net, I
> > > created
> > > > a
> > > > > directory named Net and copied SNMP.pm to that folder as well. 
> > > > > * Executing the check_ifstatus now finds the SNMP.pm in its
> > > included
> > > > > paths, but produces the session error message
> > > > > * Tried to install again/verify the SNMP.pm installation by
> > > > installing
> > > > > it through the CPAN shell:
> > > > > perl -MCPAN -e "install Net::SNMP" - That attempt returns that
> > > > > Net::SNMP is up to date.
> > > > > 
> > > > > Thanks in advance for any assistance you can provide.
> > > > > 
> > > > > Nolan
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >  
> > > > > 
> > > > > 
> > > > > -------------------------------------------------------
> > > > > 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 
> > > > > 
> > > > 
> > > > 
> > > 
> > > -- 
> > > 
> > > 
> > > 
> > > 
> > > -------------------------------------------------------
> > > 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
> > > 
> > > 
> > > -------------------------------------------------------
> > > 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
> > > 
> > 
> 
> -- 
> 
> 
> 
> 
> -------------------------------------------------------
> 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
> 



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf




More information about the Users mailing list