RAID Array Monitoring Check_raid plugin issues

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.
Locked
naharish
Posts: 4
Joined: Mon Apr 24, 2017 2:09 am

RAID Array Monitoring Check_raid plugin issues

Post by naharish »

Hi Team,

I am facing issues with Check_raid plugin. I have downloaded the check_raid plugin and I have unzipped all the files.

Here we have check_raid.pl --> perl script file. while I am running or executing this script I am getting below error message.

[root@freppau-lqsup01 libexec]# ./check_raid.pl -v
Can't locate App/Monitoring/Plugin/CheckRaid.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_raid.pl line 9.
BEGIN failed--compilation aborted at ./check_raid.pl line 9.
[root@freppau-lqsup01 libexec]# cd /usr/lib64/perl5/vendor_perl
[root@freppau-lqsup01 vendor_perl]# ls

So this is related include files in perl script. So please check and suggest to how to fix this issue.
naharish
Posts: 4
Joined: Mon Apr 24, 2017 2:09 am

Re: RAID Array Monitoring Check_raid plugin issues

Post by naharish »

Hi Team,

Please find the script which I am working. I am getting error for this script only.

[root@freppau-lqsup01 libexec]# ./check_raid.pl -v
Can't locate App/Monitoring/Plugin/CheckRaid.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_raid.pl line 9.
BEGIN failed--compilation aborted at ./check_raid.pl line 9.
[root@freppau-lqsup01 libexec]# cd /usr/lib64/perl5/vendor_perl
[root@freppau-lqsup01 vendor_perl]# ls
Attachments
check_raid.pl
(5.95 KiB) Downloaded 294 times
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: RAID Array Monitoring Check_raid plugin issues

Post by tgriep »

In the file you unziped, there is an lib/App folder that has some of the required Perl Modules that plugin needs to run.

Code: Select all

nagios-plugin-check_raid-master/lib/App
Change to that folder and run the following to copy the modules to where the plugin can find it.
Run the following from the nagios-plugin-check_raid-master/lib/App folder.

Code: Select all

cp -r *  /usr/share/perl5/App/
Then you will have to install a few perl modules from CPAN, run the following to do that.

Code: Select all

cpan -i Monitoring::Plugin
cpan -i Module::Pluggable
Try running the plugin again and see if it works.
Be sure to check out our Knowledgebase for helpful articles and solutions!
naharish
Posts: 4
Joined: Mon Apr 24, 2017 2:09 am

Re: RAID Array Monitoring Check_raid plugin issues

Post by naharish »

Hi Team,

I have copied all the libraries in given location and I followed all the steps to install CPAN files. but still I am facing the same issue.

[root@freppau-lqsup01 App]# cpan -i Monitoring::Plugin

Code: Select all

Sorry, we have to rerun the configuration dialog for CPAN.pm due to
some missing parameters...



The following questions are intended to help you with the
configuration. The CPAN module needs a directory of its own to cache
important index files and maybe keep a temporary mirror of CPAN files.
This may be a site-wide or a personal directory.



I see you already have a  directory
    /root/.cpan
Shall we use it as the general CPAN build and cache directory?

 <cpan_home>
CPAN build and cache directory? [/root/.cpan]

Unless you are accessing the CPAN on your filesystem via a file: URL,
CPAN.pm needs to keep the source files it downloads somewhere. Please
supply a directory where the downloaded files are to be kept.

 <keep_source_where>
Download target directory? [/root/.cpan/sources]

 <build_dir>
Directory where the build process takes place? [/root/.cpan/build]

Normally CPAN.pm keeps config variables in memory and changes need to
be saved in a separate 'o conf commit' command to make them permanent
between sessions. If you set the 'auto_commit' option to true, changes
to a config variable are always automatically committed to disk.

 <auto_commit>
Always commit changes to config variables to disk? [no]

CPAN.pm can limit the size of the disk area for keeping the build
directories with all the intermediate files.

 <build_cache>
Cache size for build directory (in MB)? [100]

The CPAN indexes are usually rebuilt once or twice per hour, but the
typical CPAN mirror mirrors only once or twice per day. Depending on
the quality of your mirror and your desire to be on the bleeding edge,
you may want to set the following value to more or less than one day
(which is the default). It determines after how many days CPAN.pm
downloads new indexes.

 <index_expire>
Let the index expire after how many days? [1]

By default, each time the CPAN module is started, cache scanning is
performed to keep the cache size in sync. To prevent this, answer
'never'.

 <scan_cache>
Perform cache scanning (atstart or never)? [atstart]

To considerably speed up the initial CPAN shell startup, it is
possible to use Storable to create a cache of metadata. If Storable is
not available, the normal index mechanism will be used.

Note: this mechanism is not used when use_sqlite is on and SQLLite is
running.

 <cache_metadata>
Cache metadata (yes/no)? [yes]

The CPAN module can detect when a module which you are trying to build
depends on prerequisites. If this happens, it can build the
prerequisites for you automatically ('follow'), ask you for
confirmation ('ask'), or just ignore them ('ignore'). Please set your
policy to one of the three values.

 <prerequisites_policy>
Policy on building prerequisites (follow, ask or ignore)? [ask]

Every Makefile.PL is run by perl in a separate process. Likewise we
run 'make' and 'make install' in separate processes. If you have
any parameters (e.g. PREFIX, UNINST or the like) you want to
pass to the calls, please specify them here.

If you don't understand this question, just press ENTER.

Typical frequently used settings:

    PREFIX=~/perl    # non-root users (please see manual for more hints)

 <makepl_arg>
Parameters for the 'perl Makefile.PL' command? [INSTALLDIRS=site]

Parameters for the 'make' command? Typical frequently used setting:

    -j3              # dual processor system (on GNU make)

 <make_arg>
Your choice: []

Parameters for the 'make install' command?
Typical frequently used setting:

    UNINST=1         # to always uninstall potentially conflicting files

 <make_install_arg>
Your choice: [] make install

A Build.PL is run by perl in a separate process. Likewise we run
'./Build' and './Build install' in separate processes. If you have any
parameters you want to pass to the calls, please specify them here.

Typical frequently used settings:

    --install_base /home/xxx             # different installation directory

 <mbuildpl_arg>
Parameters for the 'perl Build.PL' command? [--installdirs site]

Parameters for the './Build' command? Setting might be:

    --extra_linker_flags -L/usr/foo/lib  # non-standard library location

 <mbuild_arg>
Your choice: [] ./Build

Do you want to use a different command for './Build install'? Sudo
users will probably prefer:

    su root -c ./Build
 or
    sudo ./Build
 or
    /path1/to/sudo -u admin_account ./Build

 <mbuild_install_build_command>
or some such. Your choice: [./Build]

Parameters for the './Build install' command? Typical frequently used
setting:

    --uninst 1                           # uninstall conflicting files

 <mbuild_install_arg>
Your choice: []



If you're accessing the net via proxies, you can specify them in the
CPAN configuration or via environment variables. The variable in
the $CPAN::Config takes precedence.

 <ftp_proxy>
Your ftp_proxy? []

 <http_proxy>
Your http_proxy? []

 <no_proxy>
Your no_proxy? []

CPAN needs access to at least one CPAN mirror.

As you did not allow me to connect to the internet you need to supply
a valid CPAN URL now.

Please enter the URL of your CPAN mirror
CPAN needs access to at least one CPAN mirror.

As you did not allow me to connect to the internet you need to supply
a valid CPAN URL now.

Please enter the URL of your CPAN mirror  https://github.com/glensc/nagios-plugin-check_raid
Configuration does not allow connecting to the internet.
Current set of CPAN URLs:
  https://github.com/glensc/nagios-plugin-check_raid
Enter another URL or RETURN to quit: []
New urllist
  https://github.com/glensc/nagios-plugin-check_raid


Please remember to call 'o conf commit' to make the config permanent!

CPAN: Storable loaded ok (v2.20)
CPAN: LWP::UserAgent loaded ok (v5.833)
CPAN: Time::HiRes loaded ok (v1.9721)
Fetching with LWP:
  https://github.com/glensc/nagios-plugin-check_raid/authors/01mailrc.txt.gz

LWP failed with code[500] message[Connect failed: connect: Connection timed out; Connection timed out]
Warning: no success downloading '/root/.cpan/sources/authors/01mailrc.txt.gz.tmp4237'. Giving up on it. at /usr/share/perl5/CPAN/Index.pm line 225
Warning: no success downloading '/root/.cpan/sources/authors/01mailrc.txt.gz.tmp4237'. Giving up on it. at /usr/share/perl5/CPAN/Index.pm line 225
No external ftp command available



You have not configured a urllist and do not allow connections to the
internet to get a list of mirrors.  If you wish to get a list of CPAN
mirrors to pick from, use this command

    o conf init connect_to_internet_ok urllist

If you do not wish to get a list of mirrors and would prefer to set
your urllist manually, use just this command instead

    o conf init urllist

============================================


[root@freppau-lqsup01 tmp]# cpan -i Module::Pluggable
Sorry, we have to rerun the configuration dialog for CPAN.pm due to
some missing parameters...



The following questions are intended to help you with the
configuration. The CPAN module needs a directory of its own to cache
important index files and maybe keep a temporary mirror of CPAN files.
This may be a site-wide or a personal directory.



I see you already have a  directory
    /root/.cpan
Shall we use it as the general CPAN build and cache directory?

 <cpan_home>
CPAN build and cache directory? [/root/.cpan]

Unless you are accessing the CPAN on your filesystem via a file: URL,
CPAN.pm needs to keep the source files it downloads somewhere. Please
supply a directory where the downloaded files are to be kept.

 <keep_source_where>
Download target directory? [/root/.cpan/sources]

 <build_dir>
Directory where the build process takes place? [/root/.cpan/build]

Normally CPAN.pm keeps config variables in memory and changes need to
be saved in a separate 'o conf commit' command to make them permanent
between sessions. If you set the 'auto_commit' option to true, changes
to a config variable are always automatically committed to disk.

 <auto_commit>
Always commit changes to config variables to disk? [no]

CPAN.pm can limit the size of the disk area for keeping the build
directories with all the intermediate files.

 <build_cache>
Cache size for build directory (in MB)? [100]

The CPAN indexes are usually rebuilt once or twice per hour, but the
typical CPAN mirror mirrors only once or twice per day. Depending on
the quality of your mirror and your desire to be on the bleeding edge,
you may want to set the following value to more or less than one day
(which is the default). It determines after how many days CPAN.pm
downloads new indexes.

 <index_expire>
Let the index expire after how many days? [1]

By default, each time the CPAN module is started, cache scanning is
performed to keep the cache size in sync. To prevent this, answer
'never'.

 <scan_cache>
Perform cache scanning (atstart or never)? [atstart]

To considerably speed up the initial CPAN shell startup, it is
possible to use Storable to create a cache of metadata. If Storable is
not available, the normal index mechanism will be used.

Note: this mechanism is not used when use_sqlite is on and SQLLite is
running.

 <cache_metadata>
Cache metadata (yes/no)? [yes]

The CPAN module can detect when a module which you are trying to build
depends on prerequisites. If this happens, it can build the
prerequisites for you automatically ('follow'), ask you for
confirmation ('ask'), or just ignore them ('ignore'). Please set your
policy to one of the three values.

 <prerequisites_policy>
Policy on building prerequisites (follow, ask or ignore)? [ask]

Every Makefile.PL is run by perl in a separate process. Likewise we
run 'make' and 'make install' in separate processes. If you have
any parameters (e.g. PREFIX, UNINST or the like) you want to
pass to the calls, please specify them here.

If you don't understand this question, just press ENTER.

Typical frequently used settings:

    PREFIX=~/perl    # non-root users (please see manual for more hints)

 <makepl_arg>
Parameters for the 'perl Makefile.PL' command? [INSTALLDIRS=site]

Parameters for the 'make' command? Typical frequently used setting:

    -j3              # dual processor system (on GNU make)

 <make_arg>
Your choice: [] make

Parameters for the 'make install' command?
Typical frequently used setting:

    UNINST=1         # to always uninstall potentially conflicting files

 <make_install_arg>
Your choice: [make] 'make install

A Build.PL is run by perl in a separate process. Likewise we run
'./Build' and './Build install' in separate processes. If you have any
parameters you want to pass to the calls, please specify them here.

Typical frequently used settings:

    --install_base /home/xxx             # different installation directory

 <mbuildpl_arg>
Parameters for the 'perl Build.PL' command? [--installdirs site] ./Build install

Parameters for the './Build' command? Setting might be:

    --extra_linker_flags -L/usr/foo/lib  # non-standard library location

 <mbuild_arg>
Your choice: [] ./Build

Do you want to use a different command for './Build install'? Sudo
users will probably prefer:

    su root -c ./Build
 or
    sudo ./Build
 or
    /path1/to/sudo -u admin_account ./Build

 <mbuild_install_build_command>
or some such. Your choice: [./Build]

Parameters for the './Build install' command? Typical frequently used
setting:

    --uninst 1                           # uninstall conflicting files

 <mbuild_install_arg>
Your choice: []



If you're accessing the net via proxies, you can specify them in the
CPAN configuration or via environment variables. The variable in
the $CPAN::Config takes precedence.

 <ftp_proxy>
Your ftp_proxy? []

 <http_proxy>
Your http_proxy? []

 <no_proxy>
Your no_proxy? []

CPAN needs access to at least one CPAN mirror.

As you did not allow me to connect to the internet you need to supply
a valid CPAN URL now.

Please enter the URL of your CPAN mirror  https://github.com/glensc/nagios-plugin-check_raid/authors/01mailrc.txt.gz
Configuration does not allow connecting to the internet.
Current set of CPAN URLs:
  https://github.com/glensc/nagios-plugin-check_raid/authors/01mailrc.txt.gz
Enter another URL or RETURN to quit: []
New urllist
  https://github.com/glensc/nagios-plugin-check_raid/authors/01mailrc.txt.gz


Please remember to call 'o conf commit' to make the config permanent!

CPAN: Storable loaded ok (v2.20)
CPAN: LWP::UserAgent loaded ok (v5.833)
CPAN: Time::HiRes loaded ok (v1.9721)
Fetching with LWP:
  https://github.com/glensc/nagios-plugin-check_raid/authors/01mailrc.txt.gz/authors/01mailrc.txt.gz
LWP failed with code[500] message[Connect failed: connect: Connection timed out; Connection timed out]
Warning: no success downloading '/root/.cpan/sources/authors/01mailrc.txt.gz.tmp11922'. Giving up on it. at /usr/share/perl5/CPAN/Index.pm line 225
Warning: no success downloading '/root/.cpan/sources/authors/01mailrc.txt.gz.tmp11922'. Giving up on it. at /usr/share/perl5/CPAN/Index.pm line 225
No external ftp command available



You have not configured a urllist and do not allow connections to the
internet to get a list of mirrors.  If you wish to get a list of CPAN
mirrors to pick from, use this command

    o conf init connect_to_internet_ok urllist

If you do not wish to get a list of mirrors and would prefer to set
your urllist manually, use just this command instead

    o conf init urllist

=====================
[root@freppau-lqsup01 bin]# ./check_raid.pl
Can't locate Monitoring/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_raid.pl line 9.
BEGIN failed--compilation aborted at ./check_raid.pl line 9.
[root@freppau-lqsup01 bin]# date
Tue Apr 25 10:42:03 CEST 2017
[root@freppau-lqsup01 bin]#
Last edited by tgriep on Tue Apr 25, 2017 9:07 am, edited 1 time in total.
Reason: Added Code Wraps around large output.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: RAID Array Monitoring Check_raid plugin issues

Post by tgriep »

It looks like the cpan application had an issue connecting to the internet so make sure the system has access to the internet, rerun the cpan command and follow the instructions when prompted.
Take a look at this link for tips on using cpan.
http://www.cpan.org/modules/INSTALL.html
Be sure to check out our Knowledgebase for helpful articles and solutions!
naharish
Posts: 4
Joined: Mon Apr 24, 2017 2:09 am

Re: RAID Array Monitoring Check_raid plugin issues

Post by naharish »

Hi Team,

After doing this also we are facing the same. could you please check and let us know how to fix this issue.

[root@freppau-lqsup09 bin]# ./check_raid.pl -v
Can't locate Monitoring/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_raid.pl line 9.
BEGIN failed--compilation aborted at ./check_raid.pl line 9.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: RAID Array Monitoring Check_raid plugin issues

Post by tgriep »

Did you get the 2 cpan installs to work on your system after running the following commands?

Code: Select all

cpan -i Monitoring::Plugin
cpan -i Module::Pluggable
That plugin requires those modules to be installed for it to run.
If you are still having issues with cpan, start by looking at their site for help.
https://www.cpan.org/
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked