Can't locate UUID.pm in @INC/ VMware sdk 6.7 version

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
vy3734
Posts: 109
Joined: Tue Sep 29, 2015 4:48 pm

Can't locate UUID.pm in @INC/ VMware sdk 6.7 version

Post by vy3734 »

Hi,
I'm trying to monitor VMware ESXI hosts using nagios check_vmware_esx.pl plugin. I was able to successfully install the VMWare SDK 6.7 version on my nagios server.

[root@NagiosServer vmware-vsphere-cli-distrib]# ./vmware-install.pl --prefix=/opt/vmwarecli EULA_AGREED=yes --default
Creating a new vSphere CLI installer database using the tar4 format.

Installing vSphere CLI 6.7.0 build-8156551 for Linux.

Please wait while copying vSphere CLI files...

The installation of vSphere CLI 6.7.0 build-8156551 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command:
"/opt/vmwarecli/bin/vmware-uninstall-vSphere-CLI.pl".

This installer has successfully installed both vSphere CLI and the vSphere SDK
for Perl.

The following Perl modules were found on the system but may be too old to work
with vSphere CLI:

Crypt::SSLeay 0.72 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
IO::Socket::INET6 2.72 or newer
Net::HTTP 6.09 or newer

Enjoy,

--the VMware team
when i tried executing the plugin i'm getting the following error:

[nagios@NagiosServer libexec]$ ./check_vmware_esx.pl
Can't locate UUID.pm in @INC (@INC contains: /usr/lib64/perl5/libwww-perl-5.837/lib /usr/lib64/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/share/perl5 .) at /usr/share/perl5/VMware/SSOConnection.pm line 27.
BEGIN failed--compilation aborted at /usr/share/perl5/VMware/SSOConnection.pm line 27.
Compilation failed in require at /usr/share/perl5/VMware/VICommon.pm line 25.
BEGIN failed--compilation aborted at /usr/share/perl5/VMware/VICommon.pm line 25.
Compilation failed in require at /usr/share/perl5/VMware/VIRuntime.pm line 15.
Compilation failed in require at ./check_vmware_esx.pl line 1237.
BEGIN failed--compilation aborted at ./check_vmware_esx.pl line 1237.

Can you please help with the issue.

Thanks!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Can't locate UUID.pm in @INC/ VMware sdk 6.7 version

Post by lmiltchev »

Did you install all of the prerequisites prior to installing the SDK, as described in the article below?

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Some users have been having issues with SDK ver. 6.7. Try installing some perl modules before attempting SDK install:

Code: Select all

cpan -i YAML
yum install libxml2-devel xml2
yum install libuuid-devel
cpan -i UUID
cpan -i XML::LibXML
cpan -i Socket
cpan -i Socket6
cpan -i IO::Socket::INET6
yum install perl-Module-Build
then retry the SDK install.

Code: Select all

cd /tmp/vmware-vsphere-cli-distrib/
./vmware-install.pl
Be sure to check out our Knowledgebase for helpful articles and solutions!
vy3734
Posts: 109
Joined: Tue Sep 29, 2015 4:48 pm

Re: Can't locate UUID.pm in @INC/ VMware sdk 6.7 version

Post by vy3734 »

I've tried installing all the packages listed.I still see the same error message.

[nagios@NagiosServer libexec]$ date
Mon Sep 17 16:36:08 EDT 2018
[nagios@ma209dlvnag002 libexec]$ ./check_vmware_esx.pl
Can't locate UUID.pm in @INC (@INC contains: /usr/lib64/perl5/libwww-perl-5.837/lib /usr/lib64/perl5 /home/nagios/perl5/lib/perl5/5.16.3/x86_64-linux-thread-multi /home/nagios/perl5/lib/perl5/5.16.3 /home/nagios/perl5/lib/perl5/x86_64-linux-thread-multi /home/nagios/perl5/lib/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/share/perl5 .) at /usr/share/perl5/VMware/SSOConnection.pm line 27.
BEGIN failed--compilation aborted at /usr/share/perl5/VMware/SSOConnection.pm line 27.
Compilation failed in require at /usr/share/perl5/VMware/VICommon.pm line 25.
BEGIN failed--compilation aborted at /usr/share/perl5/VMware/VICommon.pm line 25.
Compilation failed in require at /usr/share/perl5/VMware/VIRuntime.pm line 15.
Compilation failed in require at ./check_vmware_esx.pl line 1237.
BEGIN failed--compilation aborted at ./check_vmware_esx.pl line 1237.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Can't locate UUID.pm in @INC/ VMware sdk 6.7 version

Post by lmiltchev »

Strange... when you ran:

Code: Select all

cpan -i UUID
did you verify that the UUID module got installed?

Run the following commands and show the output:

Code: Select all

perl -MUUID -le 'print $UUID::VERSION'
cpan -D UUID
Be sure to check out our Knowledgebase for helpful articles and solutions!
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Can't locate UUID.pm in @INC/ VMware sdk 6.7 version

Post by npolovenko »

@vy3734, What is the output of:
cpan -i UUID
I also recommend installing the SDK version 6.5 instead of 6.7. Many users had various compatibility issues with the latest version.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
vy3734
Posts: 109
Joined: Tue Sep 29, 2015 4:48 pm

Re: Can't locate UUID.pm in @INC/ VMware sdk 6.7 version

Post by vy3734 »

I tried installing the packages with nagios user instead of root and it worked for me. However when i manually execute the command from libexec directory, the check is giving out desired output. But nagios GUI is not getting updated with the result from the server.
here's the manual execution output.

[nagios@NagisoServer libexec]$ ./check_vmware_esx.pl -D VcenterHost -H EsxiHost -u 'username' -p 'password' -S cpu -s usage -w 85 -c 90
OK: CPU usage=8.15%|'cpu_usage'=8.15%;85;90;;

but the gui is still showing critical status, with previous output.
Nagios Output.PNG


Tried doing ndo2db restart, nagios restart. Still the same.
You do not have the required permissions to view the files attached to this post.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Can't locate UUID.pm in @INC/ VMware sdk 6.7 version

Post by npolovenko »

@vy3734, Please locate the UUID.pm module and show us its permissions.
locate UUID.pm
ls -l /usr/local/lib64/perl5/UUID.pm
Also, I'd like to see permissions of the parent directories as well. In my case:
ls -ld /usr/local/lib64/perl5/
ls -ld /usr/local/lib64/
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked