Embedded Perl Does not find installed Perl Modules
Posted: Thu Mar 15, 2012 12:09 pm
All,
I have a custom check_snmp.pl script that runs fine via the command line, but in Nagios it is returning the dreaded "Service check did not exit properly" line. The script calls Net::SNMP queries various OIDs on the target host. I use the embedded perl interpreter with Nagios...it has always worked great for me...unless it doesn't.
I turned debugging on for the embedded perl. The debug log is saying that it cannot locate Net::SNMP in @INC, but the module is there in my include path.
Wed Mar 14 17:36:59 2012 eval_file: syntax error in /usr/local/nagios/libexec/check_snmp.pl: "Can't locate Net/SNMP.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at (eval 2) line 9,
BEGIN failed--compilation aborted at (eval 2) line 16.".
[root@server Net]# pwd
/usr/lib/perl5/site_perl/5.8.8/Net
[root@venda Net]# ls
SNMP SNMP.pm
I have the latest version of Net::SNMP installed on this server...
[root@server ]# yum install net-snmp-perl.x86_64
Loaded plugins: product-id, security, subscription-manager
Updating Red Hat repositories.
Setting up Install Process
Package 1:net-snmp-perl-5.3.2.2-14.el5_7.1.x86_64 already installed and latest version
Does anyone have any experience with this? Any support is greatly appreciated.
Thanks,
Scott
I have a custom check_snmp.pl script that runs fine via the command line, but in Nagios it is returning the dreaded "Service check did not exit properly" line. The script calls Net::SNMP queries various OIDs on the target host. I use the embedded perl interpreter with Nagios...it has always worked great for me...unless it doesn't.
Wed Mar 14 17:36:59 2012 eval_file: syntax error in /usr/local/nagios/libexec/check_snmp.pl: "Can't locate Net/SNMP.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at (eval 2) line 9,
BEGIN failed--compilation aborted at (eval 2) line 16.".
[root@server Net]# pwd
/usr/lib/perl5/site_perl/5.8.8/Net
[root@venda Net]# ls
SNMP SNMP.pm
I have the latest version of Net::SNMP installed on this server...
[root@server ]# yum install net-snmp-perl.x86_64
Loaded plugins: product-id, security, subscription-manager
Updating Red Hat repositories.
Setting up Install Process
Package 1:net-snmp-perl-5.3.2.2-14.el5_7.1.x86_64 already installed and latest version
Does anyone have any experience with this? Any support is greatly appreciated.
Thanks,
Scott