Page 1 of 1

Can't locate Nagios/Plugin.pm in @INC

Posted: Mon Oct 14, 2013 4:54 am
by veenm
While running the one plugin i am getting the below error.

[root@CNPUDAS011 libexec]# perl check_3com_health.pl
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 check_3com_health.pl line 27.
BEGIN failed--compilation aborted at check_3com_health.pl line 27.
You have new mail in /var/spool/mail/root


I tried to install below packages
yum install perl-Nagios-Plugin libuuid* perl-XML-LibXML -y

But when i tried to install Nagios:plugin i got below error
[root@CNPUDAS011 libexec]# yum install perl-Nagios-Plugin
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is receiving updates from Red Hat Subscription Management.
rhel-6-server-cf-tools-1-rpms | 2.8 kB 00:00
rhel-6-server-rhev-agent-rpms | 3.1 kB 00:00
rhel-6-server-rpms | 3.7 kB 00:00
Setting up Install Process
No package perl-Nagios-Plugin available.
Error: Nothing to do


Please let me know the solution for this.

Re: Can't locate Nagios/Plugin.pm in @INC

Posted: Mon Oct 14, 2013 9:47 am
by slansing
What version of the nagios plugins package do you have installed? Did it give any compile errors? You are running this from the nagios server right?

Re: Can't locate Nagios/Plugin.pm in @INC

Posted: Tue Oct 15, 2013 1:07 am
by veenm
Yes i am running this from Nagios server and it gave me below error once i run the command

[root@CNPUDAS011 libexec]# perl check_3com_health.pl
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 check_3com_health.pl line 27.
BEGIN failed--compilation aborted at check_3com_health.pl line 27.
You have new mail in /var/spool/mail/root


I have below plugin installed on my nagios
1.4.15

I have nagios core version 3.5.1.

Re: Can't locate Nagios/Plugin.pm in @INC

Posted: Tue Oct 15, 2013 11:49 am
by sreinhardt
The perl-Nagios-Plugin is only available with rpmforge repos, which you do not have enabled. You might also be able to download the package manual from them and install via rpm or yum localinstall.

Re: Can't locate Nagios/Plugin.pm in @INC

Posted: Mon Jun 15, 2015 6:36 am
by msachikanta
I installed perl-Nagios-Plugin, but still getting same error. here are the details.

[root@server02 libexec]# yum install perl-Nagios-Plugin
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirror.ash.fastserv.com
* extras: mirror.atlanticmetro.net
* rpmforge: mirror.us.leaseweb.net
* updates: mirror.cogentco.com
Package perl-Nagios-Plugin-0.35-2.el5.rf.noarch already installed and latest version
Nothing to do
[root@server02 libexec]#

[root@server02 libexec]# ./check_glusterfs -v vol1 -n 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 ./check_gfs_volume line 4.
BEGIN failed--compilation aborted at ./check_glusterfs line 4.
[root@server02 libexec]#

Please help on this.

Re: Can't locate Nagios/Plugin.pm in @INC

Posted: Mon Jun 15, 2015 9:20 am
by tmcdonald
Please run the following from your libexec directory and post the output:

Code: Select all

head check_glusterfs
find / -name Plugin.pm