You are here

check_apache_ checks dont work from GUI but ok from cmd line and test check in GUI

2 posts / 0 new
Last post
darrenglynn
darrenglynn's picture
check_apache_ checks dont work from GUI but ok from cmd line and test check in GUI

Hi we are getting some issues with apache checks from our Opsview Core installation. If I test from the command line and with the test check option from gui all is ok yet the check is constantly failing because it cant find the Nagios/Plugin.pm yet it is referenced in the PERL5LIB variables shown below for the nagios user. Apache accesses CRITICAL 2/2 [Can't locate Nagios/Plugin.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/nagios/libexec/check_apache_performance line 11.\nBEGIN failed--compilation aborted at /usr/local/nagios/libexec/check_apache_performance line 11.] perl -V output; %ENV: PERL5LIB="/usr/local/nagios/lib:/usr/local/nagios/perl/lib:/opt/opsview/perl/lib/perl5" PERLTIDY="/usr/local/nagios/.perltidyrc" @INC: /usr/local/nagios/lib /usr/local/nagios/perl/lib/x86_64-linux-thread-multi /usr/local/nagios/perl/lib /opt/opsview/perl/lib/perl5/x86_64-linux-thread-multi /opt/opsview/perl/lib/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 Is this a known issue rgds Darren

darrenglynn
darrenglynn's picture
issue due to missing perl package

Hi,

this has now been resolved but maybe a bug too?

the problem was a missing perl-Nagios-Plugin package on production server, the @INC folder wasn't honouring the nagios environment but the plugin on test was in two places.

/opt/opsview/perl/lib/perl5/Nagios/Plugin.pm
/usr/share/perl5/vendor_perl/Nagios/Plugin.pm

when the new package was installed the plugin could be found from the vendor_perl dir and checks are working now. My question then is why did it ignore this plugin that is in the opsview perl dir?

rgds
Darren