Datastore Monitoring not Working ---Can't locate Nagios/Plug

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.
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Datastore Monitoring not Working ---Can't locate Nagios/Plug

Post by amitgupta19 »

I am trying to monitor the datastore using the plugin check_esx3.pl

i am using the following command:

sudo ./check_esx3.pl -D xxx.xxx.xxx.xxx -u "XXXXXXXXXX" -p "XXXXXXXX" -l vmfs -s "3PAR2r1-0" -w 85% -c 90%

It is giving the following error:
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_esx3.pl line 31.
BEGIN failed--compilation aborted at ./check_esx3.pl line 31.

When i try to install the Perl using the below command
sudo perl -MCPAN -e 'install Nagios::Plugin'

it is asking for the Username and password for a Proxy:
================================================
Fetching with HTTP::Tiny:
http://mirror.datapipe.net/CPAN/authors/01mailrc.txt.gz
HTTP::Tiny failed with an internal error: Could not connect to 'myproxy.mydomain.com:0000': IO::Socket::INET: Bad hostname 'myproxy.mydomain.com'


Proxy authentication needed!
(Note: to permanently configure username and password run
o conf proxy_user your_username
o conf proxy_pass your_password
)
Username:
=======================================================

Any idea where is the Problem?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Datastore Monitoring not Working ---Can't locate Nagios/

Post by scottwilkerson »

Nagios::Plugin is deprecated, you will need to install Nagios::Monitoring::Plugin

Code: Select all

cd /tmp
wget https://www.cpan.org/modules/by-module/Nagios/Nagios-Monitoring-Plugin-0.51.tar.gz
tar xzf Nagios-Monitoring-Plugin-0.51.tar.gz
cd Nagios-Monitoring-Plugin-0.51
perl Makefile.PL
make
make test
make install
then update the plugin

Code: Select all

sed -i -e 's/Nagios::Plugin/Nagios::Monitoring::Plugin/g' /path/to/check_esx3.pl 
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Re: Datastore Monitoring not Working ---Can't locate Nagios/

Post by amitgupta19 »

Now the error seems to be changed:

Can't locate Params/Validate.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/share/perl5/Nagios/Monitoring/Plugin/Functions.pm line 11.
BEGIN failed--compilation aborted at /usr/local/share/perl5/Nagios/Monitoring/Plugin/Functions.pm line 11.
Compilation failed in require at /usr/local/share/perl5/Nagios/Monitoring/Plugin.pm line 4.
BEGIN failed--compilation aborted at /usr/local/share/perl5/Nagios/Monitoring/Plugin.pm line 4.
Compilation failed in require at ./check_esx3.pl line 31.
BEGIN failed--compilation aborted at ./check_esx3.pl line 31.


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Note: This is from the new setup that i am doing. I have just installed the Nagios Core on OEL-7 and trying to setup the monitoring of the datastores.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Datastore Monitoring not Working ---Can't locate Nagios/

Post by scottwilkerson »

This looks like you are missing another required per package

Code: Select all

yum install 'perl(Params::Validate)'
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Re: Datastore Monitoring not Working ---Can't locate Nagios/

Post by amitgupta19 »

Another Package missing:::
============================================================================

Can't locate Math/Calc/Units.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/share/perl5/Nagios/Monitoring/Plugin/Functions.pm line 12.
BEGIN failed--compilation aborted at /usr/local/share/perl5/Nagios/Monitoring/Plugin/Functions.pm line 12.
Compilation failed in require at /usr/local/share/perl5/Nagios/Monitoring/Plugin.pm line 4.
BEGIN failed--compilation aborted at /usr/local/share/perl5/Nagios/Monitoring/Plugin.pm line 4.
Compilation failed in require at ./check_esx3.pl line 31.
BEGIN failed--compilation aborted at ./check_esx3.pl line 31.


==========================================================================
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Datastore Monitoring not Working ---Can't locate Nagios/

Post by scottwilkerson »

Code: Select all

yum install 'perl(Math::Calc::Units)'
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Re: Datastore Monitoring not Working ---Can't locate Nagios/

Post by amitgupta19 »

After this when i try to install the 'VMware Infrastructure (VI) Perl Toolkit' required. Then it is giving the following error:

It seems that some more perl package are missing
====================================================================================
Can't locate Module/Build.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 .).
BEGIN failed--compilation aborted.
Below mentioned modules with their version needed to be installed,
these modules are available in your system but vCLI need specific
version to run properly

Module: ExtUtils::MakeMaker, Version: 6.96
Module: Module::Build, Version: 0.4205
Do you want to continue? (yes/no) yes

Please wait while configuring perl modules using CPAN ...

CPAN is downloading and installing pre-requisite Perl module "Time::Piece" .

Time::Piece Install Command failed .

CPAN is downloading and installing pre-requisite Perl module "Archive::Zip" .

Archive::Zip Install Command failed .

CPAN is downloading and installing pre-requisite Perl module "Path::Class" .

Path::Class Install Command failed .

CPAN is downloading and installing pre-requisite Perl module "Crypt::SSLeay" .

Crypt::SSLeay Install Command failed .

CPAN is downloading and installing pre-requisite Perl module "version" .

version Install Command failed .

CPAN is downloading and installing pre-requisite Perl module "HTML::Parser" .

HTML::Parser Install Command failed .

CPAN is downloading and installing pre-requisite Perl module "UUID" .

UUID Install Command failed .

CPAN is downloading and installing pre-requisite Perl module "XML::SAX" .

XML::SAX Install Command failed .

CPAN is downloading and installing pre-requisite Perl module
"XML::NamespaceSupport" .

XML::NamespaceSupport Install Command failed .

CPAN is downloading and installing pre-requisite Perl module
"XML::LibXML::Common" .

XML::LibXML::Common Install Command failed .

CPAN is downloading and installing pre-requisite Perl module "XML::LibXML" .

XML::LibXML Install Command failed .

CPAN is downloading and installing pre-requisite Perl module "LWP" .

LWP Install Command failed .

CPAN is downloading and installing pre-requisite Perl module
"LWP::Protocol::https" .

LWP::Protocol::https Install Command failed .

CPAN is downloading and installing pre-requisite Perl module "Socket6 " .

Socket6 Install Command failed .

CPAN is downloading and installing pre-requisite Perl module "Text::Template" .


Text::Template Install Command failed .

CPAN is downloading and installing pre-requisite Perl module
"IO::Socket::INET6" .

IO::Socket::INET6 Install Command failed .

Can't locate LWP.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 .).
BEGIN failed--compilation aborted.
Can't locate LWP/Protocol/https.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 .).
BEGIN failed--compilation aborted.
CPAN is downloading and installing pre-requisite Perl module "Net::INET6Glue" .


Net::INET6Glue Install Command failed .

CPAN is downloading and installing pre-requisite Perl module "Net::HTTP" .

Net::HTTP Install Command failed .

CPAN not able to install following Perl modules on the system. These must be
installed manually for use by vSphere CLI:

Time::Piece 1.31 or newer
Archive::Zip 1.28 or newer
Path::Class 0.33 or newer
Crypt::SSLeay 0.72 or newer
version 0.78 or newer
HTML::Parser 3.60 or newer
UUID 0.27 or newer
XML::SAX 0.99 or newer
XML::NamespaceSupport 1.12 or newer
XML::LibXML::Common 2.0129 or newer
XML::LibXML 2.0129 or newer
LWP 6.26 or newer
LWP::Protocol::https 6.07 or newer
Socket6 0.28 or newer
Text::Template 1.47 or newer
IO::Socket::INET6 2.72 or newer
Net::INET6Glue 0.603 or newer
Net::HTTP 6.09 or newer
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Datastore Monitoring not Working ---Can't locate Nagios/

Post by scottwilkerson »

This is showing you are missing another package

Code: Select all

yum install 'perl(Module::Build)'
But also, it doesn't appear that the vmware installer can successfully able to install the packages it needs from CPAN
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Re: Datastore Monitoring not Working ---Can't locate Nagios/

Post by amitgupta19 »

After installing all the Missing Modules/packages, now the error has changed

/usr/bin/perl: symbol lookup error: /usr/local/lib64/perl5/auto/Class/MethodMaker/MethodMaker.so: undefined symbol: Perl_Gthr_key_ptr

Please suggest
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Re: Datastore Monitoring not Working ---Can't locate Nagios/

Post by amitgupta19 »

As i informed previously, i am trying to setup the New Nagios Core on the Oracle Linux 7.

I checked on my Current Nagios Server which is running on centos. both the following directories didn't exist on this server.

/usr/bin/perl
/usr/local/lib64/perl5/auto/Class/MethodMaker

Any ideas
Locked