Issue with Check HP Modular Smart Array

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
gm_rajkumar
Posts: 187
Joined: Tue Feb 28, 2012 7:08 am
Location: CA, USA

Issue with Check HP Modular Smart Array

Post by gm_rajkumar »

Im trying to this Check HP Modular Smart Array (msa) sensors https://www.monitoringexchange.org/inve ... 29-sensors while executing this plugin. Im getting below error message.

# /usr/bin/perl5.8.8 check_msa_hardware.pl
Parameter to use lib must be directory, not file at check_msa_hardware.pl line 24
Can't locate Nagios/Plugin.pm in @INC (@INC contains: /usr/local/nagios/libexec /usr/bin/perl5.8.8 /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at check_msa_hardware.pl line 28.
BEGIN failed--compilation aborted at check_msa_hardware.pl line 28.


Regards,
Raj.
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: Issue with Check HP Modular Smart Array

Post by yancy »

Raj,

Looks like your missing some perl module.

Try installing Config::Tiny as root using cpan.

perl -MCPAN -e 'install Config::Tiny'


Regards,

-Yancy
gm_rajkumar
Posts: 187
Joined: Tue Feb 28, 2012 7:08 am
Location: CA, USA

Re: Issue with Check HP Modular Smart Array

Post by gm_rajkumar »

I tried, got below result.

CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Database was generated on Tue, 31 Jul 2012 13:12:26 GMT
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
ftp://ftp.perl.org/pub/CPAN/authors/01mailrc.txt.gz
Going to read /root/.cpan/sources/authors/01mailrc.txt.gz
CPAN: Compress::Zlib loaded ok
Fetching with LWP:
ftp://ftp.perl.org/pub/CPAN/modules/02p ... ils.txt.gz
Going to read /root/.cpan/sources/modules/02packages.details.txt.gz
Database was generated on Sun, 29 Jul 2012 10:14:45 GMT

There's a new CPAN.pm version (v1.9800) available!
[Current version is v1.7602]
You might want to try
install Bundle::CPAN
reload cpan
without quitting the current session. It should be a seamless upgrade
while we are running...

Fetching with LWP:
ftp://ftp.perl.org/pub/CPAN/modules/03modlist.data.gz
Going to read /root/.cpan/sources/modules/03modlist.data.gz
Going to write /root/.cpan/Metadata
Config::Tiny is up to date.



[root@monitoring libexec]# ./check_msa_hardware.pl --help
Parameter to use lib must be directory, not file at ./check_msa_hardware.pl line 24
Can't locate Nagios/Plugin.pm in @INC (@INC contains: /usr/local/nagios/libexec /usr/bin/perl5.8.8 /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at ./check_msa_hardware.pl line 28.
BEGIN failed--compilation aborted at ./check_msa_hardware.pl line 28.
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: Issue with Check HP Modular Smart Array

Post by yancy »

Hmm. Take a look at:

http://exchange.nagios.org/directory/Pl ... st/details

at the bottom of the page is a listing of the different perl modules that needed to be installed.

try installing these/making sure they are updated:
perl -MCPAN -e 'install Nagios::Plugin'
perl -MCPAN -e 'install Params::Validate'
perl -MCPAN -e 'install Math::Calc::Units'
perl -MCPAN -e 'install Class::Accessor::Fast'

-Yancy
gm_rajkumar
Posts: 187
Joined: Tue Feb 28, 2012 7:08 am
Location: CA, USA

Re: Issue with Check HP Modular Smart Array

Post by gm_rajkumar »

When i tried to run perl -MCPAN -e 'install Nagios::Plugin'

the following error occurs


Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/Nagios-Plugin-01.t 255 65280 15 29 193.33% 1-15
t/Nagios-Plugin-02.t 255 65280 103 205 199.03% 1-103
t/Nagios-Plugin-03.t 255 65280 61 119 195.08% 1 3-61
t/Nagios-Plugin-04.t 255 65280 30 59 196.67% 1-30
t/Nagios-Plugin-Functions-01.t 255 65280 113 225 199.12% 1-113
t/Nagios-Plugin-Functions-02.t 255 65280 37 73 197.30% 1-37
t/Nagios-Plugin-Functions-03.t 255 65280 8 15 187.50% 1-8
t/Nagios-Plugin-Getopt-01.t 255 65280 76 151 198.68% 1-76
t/Nagios-Plugin-Getopt-02.t 255 65280 14 27 192.86% 1-14
t/Nagios-Plugin-Getopt-03.t 255 65280 1 1 100.00% 1
t/Nagios-Plugin-Getopt-04.t 255 65280 11 21 190.91% 1-11
t/Nagios-Plugin-Performance-02.t 3 768 3 4 133.33% 1-2 4
t/Nagios-Plugin-Performance.t 255 65280 ?? ?? % ??
t/Nagios-Plugin-Range.t 255 65280 151 301 199.34% 1-151
t/Nagios-Plugin-Threshold.t 255 65280 93 183 196.77% 1 3-93
t/check_stuff.t 13 3328 14 13 92.86% 1-10 12-14
Failed 16/16 test scripts, 0.00% okay. 726/730 subtests failed, 0.55% okay.
make: *** [test_dynamic] Error 255
/usr/bin/make test -- NOT OK
Running make install
make test had returned bad status, won't install without force
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: Issue with Check HP Modular Smart Array

Post by yancy »

Raj,

What was the result of installing these perl modules?

perl -MCPAN -e 'install Params::Validate'
perl -MCPAN -e 'install Math::Calc::Units'
perl -MCPAN -e 'install Class::Accessor::Fast'

-Yancy
gm_rajkumar
Posts: 187
Joined: Tue Feb 28, 2012 7:08 am
Location: CA, USA

Re: Issue with Check HP Modular Smart Array

Post by gm_rajkumar »

I have executed this command, there is no issue on Calc::Units and Accessor::Fast. However, i have got some error message on Params::Validate file and enclosed in this. please have a look into this.

[root@monitoring libexec]# perl -MCPAN -e 'install Math::Calc::Units'
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Database was generated on Sun, 29 Jul 2012 10:14:45 GMT
Math::Calc::Units is up to date.


[root@monitoring libexec]# perl -MCPAN -e 'install Class::Accessor::Fast'
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Database was generated on Sun, 29 Jul 2012 10:14:45 GMT
Class::Accessor::Fast is up to date.
Attachments
param-validate.txt
perl -MCPAN -e 'install Params::Validate' result
(17.34 KiB) Downloaded 265 times
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: Issue with Check HP Modular Smart Array

Post by yancy »

What version of linux and architecture type are you running?

can you post the following:

uname -r
cat /etc/*release*
gm_rajkumar
Posts: 187
Joined: Tue Feb 28, 2012 7:08 am
Location: CA, USA

Re: Issue with Check HP Modular Smart Array

Post by gm_rajkumar »

[root@monitoring libexec]# uname -r
2.6.18-308.8.1.el5

root@monitoring etc]# cat redhat-release
Red Hat Enterprise Linux Server release 5.8 (Tikanga)


let me know if you need further details.
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: Issue with Check HP Modular Smart Array

Post by yancy »

Raj,

open cpan

Code: Select all

 cpan 
and force install of Nagios::Plugin

Code: Select all

 force install Nagios::Plugin 
-Yancy
Locked