[Nagiosplug-help] check_squid.pl cannot run in Nagios ; works from the CLI

Marc Powell marc at ena.com
Thu Dec 10 15:05:05 CET 2009


On Dec 10, 2009, at 3:12 AM, J4 wrote:

> Status now o/ps something more interesting ; Thank-you once more Mark.
> Can't locate utils.pm in @INC (@INC contains: /usr/lib/nagios/plugins
> /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0
> /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10
> /usr/local/lib/site_perl .) at /usr/local/nagios/libexec/check_squid.pl
> line 21.

The perl PATH here doesn't include /usr/local/nagios/libexec so utils.pm can't be located.

> The pm files are in the right place:

> -rwxr-xr-x 1 nagios nagios 2055 2009-12-09 11:37
> /usr/local/nagios/libexec/utils.pm
> 
> I googled a little and note this is a common problem. I read many
> threads about it but none that provided a solution that I could follow.

The person who wrote the plugin apparently did so on a system where the plugins had been installed via third party or distribution specific package (hence the /usr/lib/nagios/plugins path). Edit the script and change 

use lib "/usr/lib/nagios/plugins";

to

use lib "/usr/local/nagios/libexec";

--
Marc





More information about the Help mailing list