PDA

View Full Version : [SOLVED] How to Configure Nagios for SNMP support


bisana
09-06-2005, 10:40 AM
Hi Team
RHEL4 , Nagios 1.2 , Oreon
Before posting this mail , I admit I am a person who remember very little and I am trying to over come it
Now the post
“ I had done installation of Nagios for SNMP monitoring , few months back for testing purpose , and I do not remember now what I had done , whether I did give any parameter to the ./configure file for snmp , I had read the nagios documentation for installation , there it is no reference for how to install nagios for SNMP monitoring
This time , I had done my nagios installation , just by giving “./configure “ without any parameters and I finding problem when I run snmp plugins
I get error
./check_snmp_int.pl
Can't locate Net/SNMP.pm in @INC (@INC contains: /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at ./check_snmp_int.pl line 16.
BEGIN failed--compilation aborted at ./check_snmp_int.pl line 16.

Please guide me to configure nagios for snmp
Thanks
Joseph John

wistof
09-06-2005, 10:46 AM
hello,

you don't have installed snmp support for perl

try this :#perl -MCPAN -e shell
cpan> install Net::SNMP

bisana
09-06-2005, 11:25 AM
Hi wistof
thanks for the mail
I have Net::SNMP isntalled
the following query shows it


1> [root@john libexec]# rpm -qa | grep snmp
net-snmp-perl-5.1.2-11
net-snmp-5.1.2-11
net-snmp-devel-5.1.2-11
net-snmp-utils-5.1.2-11
net-snmp-libs-5.1.2-11
[root@john libexec]#


2> [root@john libexec]# find / -name "SNMP.pm" -print
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/SNMP.pm

I thing , this results shows that Net::SNMP is installed, more over , by usning snmpwalk I can get results
Thanks for the help
Joseph John

wistof
09-06-2005, 11:40 AM
try with CPAN...

the perl script search in
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/Net/SNMP.pm
and your is in
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/SNMP.pm

bisana
09-06-2005, 12:11 PM
Hi
Thanks a lot ,
your adivice on
#perl -MCPAN -e shell
cpan> install Net::SNMP
Saved me , from further problems
Thanks
Joseph John

surcouf
09-06-2005, 02:40 PM
Hi wistof
thanks for the mail
I have Net::SNMP isntalled
the following query shows it


1> [root@john libexec]# rpm -qa | grep snmp
net-snmp-perl-5.1.2-11
net-snmp-5.1.2-11
net-snmp-devel-5.1.2-11
net-snmp-utils-5.1.2-11
net-snmp-libs-5.1.2-11
[root@john libexec]#


2> [root@john libexec]# find / -name "SNMP.pm" -print
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/SNMP.pm

I thing , this results shows that Net::SNMP is installed, more over , by usning snmpwalk I can get results


No. You've installed Net-SNMP perl module, not Net::SNMP perl module.
This isn't the same module. For the RPM way, you can find this module at:
http://dag.wieers.com/packages/perl-Net-SNMP/

bisana
09-06-2005, 02:50 PM
Hi surcouf
Thanks , that info was new to me ,
Thanks a lot
Joseph John
:D