Unable to add ESXi host

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
rekhan
Posts: 7
Joined: Thu Mar 15, 2018 7:48 am

Unable to add ESXi host

Post by rekhan »

Hi,

I was able to add few ESXi host in Nagios after which it throws an error that VMWare SDK Perl is not installed.
The exact error message is "It appears as though you have not installed VMware SDK or ESXi plugins on your Nagios XI Server. You must have these components properly installed on your system before using the wizard".

This is weird. VMware SDK was installed and I was able to add few hosts.

Request someone to assist in this.

Thank You

Rekha Kumari Nemichand
State Auto Insurance.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Unable to add ESXi host

Post by lmiltchev »

What is the version of the ESXi server, that you are trying to monitor, and the SDK, installed on the Nagios XI machine? Did you follow our official documentation?

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

When do you see this error - when selecting "Monitor the VMware host" or "Monitor a guest VM on the VMWare host" in Step 1 of the VMware wizard?

Did you get any error messages after you installed SDK, e.g. some of the perl modules being too old?

Run the following commands from the command line and show the output:

Code: Select all

uname -a
cat /etc/*release
grep full /usr/local/nagiosxi/var/xiversion
ls -la /usr/local/nagios/libexec/check_esx3.pl
/usr/local/nagios/libexec/check_esx3.pl -h | head -10
/usr/local/nagios/libexec/check_esx3.pl -H <cliend ip> -u 'username' -p 'password' -l "CPU" -v
Note: Remove/obfuscate sensitive info.
Be sure to check out our Knowledgebase for helpful articles and solutions!
rekhan
Posts: 7
Joined: Thu Mar 15, 2018 7:48 am

Re: Unable to add ESXi host

Post by rekhan »

Hi

When I tried reinstalling the perl sdk, it did display that the cli module is too old however at the end i got a message Enjoy, --the vmware team.
Looking at the documentation, "https://assets.nagios.com/downloads/nag ... ios-XI.pdf" Pg no. 9 mentions to check if check_esx3.pl is in /usr/local/nagios/ibexec directory and it is.

Please find the output of the commands
[root@sadc3nagiost1 ~]# uname -a
Linux sadc3nagiost1.corp.stateauto.com 3.10.0-693.17.1.el7.x86_64 #1 SMP Sun Jan 14 10:36:03 EST 2018 x86_64 x86_64 x86_64 GNU/Linux

[root@sadc3nagiost1 ~]# cat /etc/*release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.4 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.4"
PRETTY_NAME="Red Hat Enterprise Linux"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.4:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.4
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.4"
Red Hat Enterprise Linux Server release 7.4 (Maipo)
Red Hat Enterprise Linux Server release 7.4 (Maipo)


[root@sadc3nagiost1 ~]# grep full /usr/local/nagiosxi/var/xiversion
full=5.4.12

[root@sadc3nagiost1 ~]# /usr/local/nagios/libexec/check_esx3.pl -h | head -10
Can't locate Nagios/Plugin/Functions.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/nagios/libexec/check_esx3.pl line 40.
BEGIN failed--compilation aborted at /usr/local/nagios/libexec/check_esx3.pl line 40.

[root@sadc3nagiost1 ~]# /usr/local/nagios/libexec/check_esx3.pl -H 10.30.195.48 -u root -p @xxxxxxx -l "CPU" -v
Can't locate Nagios/Plugin/Functions.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/nagios/libexec/check_esx3.pl line 40.
BEGIN failed--compilation aborted at /usr/local/nagios/libexec/check_esx3.pl line 40.


The last 2 commands threw an error.
Request to assist further.
rekhan
Posts: 7
Joined: Thu Mar 15, 2018 7:48 am

Re: Unable to add ESXi host

Post by rekhan »

Hi

The version of ESXi server is 6.5 U1. SDK is installed in the Nagios server becoz of which i was able to add 9 ESXi hosts which are running the same version.
I followed the documentation - >https://assets.nagios.com/downloads/nag ... ios-XI.pdf
I have tried uninstalling and reinstalling the perl sdk. The outcome of the installation is
The installation of vSphere CLI 6.5.0 build-4566394 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command:
"/usr/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:


MIME::Base64 3.14 or newer
Try::Tiny 0.22 or newer
LWP 6.15 or newer
LWP::Protocol::https 6.04 or newer
Socket6 0.23 or newer
IO::Socket::INET6 2.71 or newer
Net::HTTP 6.09 or newer

Enjoy,

--the VMware team

Please find below the outcome of the commands
[root@sadc3nagiost1 vmware-vsphere-cli-distrib]# uname -a
Linux sadc3nagiost1.corp.stateauto.com 3.10.0-693.17.1.el7.x86_64 #1 SMP Sun Jan 14 10:36:03 EST 2018 x86_64 x86_64 x86_64 GNU/Linux

[root@sadc3nagiost1 vmware-vsphere-cli-distrib]# cat /etc/*release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.4 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.4"
PRETTY_NAME="Red Hat Enterprise Linux"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.4:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.4
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.4"
Red Hat Enterprise Linux Server release 7.4 (Maipo)
Red Hat Enterprise Linux Server release 7.4 (Maipo)
[root@sadc3nagiost1 vmware-vsphere-cli-distrib]#

[root@sadc3nagiost1 vmware-vsphere-cli-distrib]# grep full /usr/local/nagiosxi/var/xiversion
full=5.4.12

[root@sadc3nagiost1 vmware-vsphere-cli-distrib]# ls -la /usr/local/nagios/libexec/check_esx3.pl
-rwxrwxr-x. 1 apache nagios 169440 Mar 7 11:45 /usr/local/nagios/libexec/check_esx3.pl

[root@sadc3nagiost1 vmware-vsphere-cli-distrib]# /usr/local/nagios/libexec/check_esx3.pl -h | head -10
Can't locate Nagios/Plugin/Functions.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/nagios/libexec/check_esx3.pl line 40.
BEGIN failed--compilation aborted at /usr/local/nagios/libexec/check_esx3.pl line 40.


i have not run the last command...

based on the error, i checked where the functions.pm file is located
[root@sadc3nagiost1 ~]# find / -iname functions.pm
find: â/proc/19518â: No such file or directory
/tmp/nagiosxi/subcomponents/extraplugins/Nagios-Monitoring-Plugin-0.51/blib/lib/Nagios/Monitoring/Plugin/Functions.pm
/usr/lib64/perl5/vendor_perl/File/Spec/Functions.pm
/usr/share/perl5/Pod/Functions.pm
/usr/local/share/perl5/Nagios/Monitoring/Plugin/Functions.pm
/home/kav9999/Nagios-Monitoring-Plugin-0.51/lib/Nagios/Monitoring/Plugin/Functions.pm
/home/kav9999/Nagios-Monitoring-Plugin-0.51/blib/lib/Nagios/Monitoring/Plugin/Functions.pm
When i tried to copy the functions.pm file to /usr/local/nagios/libexec/check_esx3.pl it prompted if i wish to overwrite it, which I didnot want to and havent proceeded further.

Request you to assist in this further.

Thank You.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Unable to add ESXi host

Post by lmiltchev »

Based on the output below:
[root@sadc3nagiost1 ~]# /usr/local/nagios/libexec/check_esx3.pl -h | head -10
Can't locate Nagios/Plugin/Functions.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/nagios/libexec/check_esx3.pl line 40.
BEGIN failed--compilation aborted at /usr/local/nagios/libexec/check_esx3.pl line 40.
I tend to believe that you are missing the Nagios::Plugin::Functions module. You verify if the module is installed, and check it's version by running:

Code: Select all

perl -MNagios::Plugin::Functions -le 'print $Nagios::Plugin::Functions::VERSION'
If the module is not installed, you could try installing it by running:

Code: Select all

cpan -i Nagios::Plugin::Functions
As far as the outdated perl modules below:
The following Perl modules were found on the system but may be too old to work
with vSphere CLI:

MIME::Base64 3.14 or newer
Try::Tiny 0.22 or newer
LWP 6.15 or newer
LWP::Protocol::https 6.04 or newer
Socket6 0.23 or newer
IO::Socket::INET6 2.71 or newer
Net::HTTP 6.09 or newer
you could try installing cpanm:

Code: Select all

curl -L http://cpanmin.us | perl - App::cpanminus
then updating the modules one-by-one:

Code: Select all

cpanm <name of the module>
or with one go:

Code: Select all

cpanm MIME::Base64 Try::Tiny LWP LWP::Protocol::https Socket6 IO::Socket::INET6 Net::HTTP
If installing of a particular module fails, you could try forcing it by running:

Code: Select all

cpanm -f <name of the module>
Also, check the version of the VMware wizard that you have on your system - Admin > System Extensions > Manage Config Wizards. Check for updates by clicking on "Check for Updates" button under the "Manage Configuration Wizards" page. If there is a newer version of the VMware wizard to the one that you are currently using, install it.

Let us know if this helped.
Be sure to check out our Knowledgebase for helpful articles and solutions!
rekhan
Posts: 7
Joined: Thu Mar 15, 2018 7:48 am

Re: Unable to add ESXi host

Post by rekhan »

Hi,

I checked if there is any update for VMWare and there wasnt any.

I ran thru the commands mentioned by you and below is the outcome of those commands

Code: Select all

Installing /usr/local/share/perl5/libwww/lwpcook.pod
Installing /usr/local/share/perl5/LWP/RobotUA.pm
Installing /usr/local/share/perl5/LWP/Debug.pm
Installing /usr/local/share/perl5/LWP/ConnCache.pm
Installing /usr/local/share/perl5/LWP/Protocol.pm
Installing /usr/local/share/perl5/LWP/DebugFile.pm
Installing /usr/local/share/perl5/LWP/UserAgent.pm
Installing /usr/local/share/perl5/LWP/Simple.pm
Installing /usr/local/share/perl5/LWP/MemberMixin.pm
Installing /usr/local/share/perl5/LWP/Authen/Ntlm.pm
Installing /usr/local/share/perl5/LWP/Authen/Digest.pm
Installing /usr/local/share/perl5/LWP/Authen/Basic.pm
Installing /usr/local/share/perl5/LWP/Debug/TraceHTTP.pm
Installing /usr/local/share/perl5/LWP/Protocol/ftp.pm
Installing /usr/local/share/perl5/LWP/Protocol/gopher.pm
Installing /usr/local/share/perl5/LWP/Protocol/cpan.pm
Installing /usr/local/share/perl5/LWP/Protocol/file.pm
Installing /usr/local/share/perl5/LWP/Protocol/data.pm
Installing /usr/local/share/perl5/LWP/Protocol/nogo.pm
Installing /usr/local/share/perl5/LWP/Protocol/loopback.pm
Installing /usr/local/share/perl5/LWP/Protocol/nntp.pm
Installing /usr/local/share/perl5/LWP/Protocol/http.pm
Installing /usr/local/share/perl5/LWP/Protocol/mailto.pm
Installing /usr/local/share/man/man1/lwp-dump.1
Installing /usr/local/share/man/man1/lwp-mirror.1
Installing /usr/local/share/man/man1/lwp-download.1
Installing /usr/local/share/man/man1/lwp-request.1
Installing /usr/local/share/man/man3/LWP::RobotUA.3pm
Installing /usr/local/share/man/man3/LWP::Debug.3pm
Installing /usr/local/share/man/man3/libwww::lwpcook.3pm
Installing /usr/local/share/man/man3/LWP::Authen::Ntlm.3pm
Installing /usr/local/share/man/man3/LWP.3pm
Installing /usr/local/share/man/man3/LWP::Protocol.3pm
Installing /usr/local/share/man/man3/LWP::ConnCache.3pm
Installing /usr/local/share/man/man3/libwww::lwptut.3pm
Installing /usr/local/share/man/man3/LWP::Simple.3pm
Installing /usr/local/share/man/man3/LWP::UserAgent.3pm
Installing /usr/local/share/man/man3/LWP::MemberMixin.3pm
Installing /usr/local/bin/lwp-dump
Installing /usr/local/bin/lwp-mirror
Installing /usr/local/bin/lwp-download
Installing /usr/local/bin/lwp-request
Appending installation info to /usr/lib64/perl5/perllocal.pod
  OALDERS/libwww-perl-6.33.tar.gz
  /bin/make install  -- OK
Running install for module 'LWP::Protocol::https'
Running make for O/OA/OALDERS/LWP-Protocol-https-6.07.tar.gz
Fetching with LWP:
http://www.namesdir.com/mirrors/cpan/authors/id/O/OA/OALDERS/LWP-Protocol-https-6.07.tar.gz
Checksum for /root/.cpan/sources/authors/id/O/OA/OALDERS/LWP-Protocol-https-6.07.tar.gz ok

  CPAN.pm: Building O/OA/OALDERS/LWP-Protocol-https-6.07.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for LWP::Protocol::https
cp lib/LWP/Protocol/https.pm blib/lib/LWP/Protocol/https.pm
Manifying blib/man3/LWP::Protocol::https.3pm
  OALDERS/LWP-Protocol-https-6.07.tar.gz
  /bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/apache.t ....... ok
t/https_proxy.t .. skipped: no recent version of IO::Socket::SSL::Utils
All tests successful.
Files=2, Tests=5,  2 wallclock secs ( 0.01 usr  0.00 sys +  0.14 cusr  0.01 csys =  0.16 CPU)
Result: PASS
  OALDERS/LWP-Protocol-https-6.07.tar.gz
  /bin/make test -- OK
Running make install
Manifying blib/man3/LWP::Protocol::https.3pm
Installing /usr/local/share/perl5/LWP/Protocol/https.pm
Installing /usr/local/share/man/man3/LWP::Protocol::https.3pm
Appending installation info to /usr/lib64/perl5/perllocal.pod
  OALDERS/LWP-Protocol-https-6.07.tar.gz
  /bin/make install  -- OK
Running install for module 'Socket6'
Running make for U/UM/UMEMOTO/Socket6-0.28.tar.gz
Fetching with LWP:
http://www.namesdir.com/mirrors/cpan/authors/id/U/UM/UMEMOTO/Socket6-0.28.tar.gz
Fetching with LWP:
http://www.namesdir.com/mirrors/cpan/authors/id/U/UM/UMEMOTO/CHECKSUMS
Checksum for /root/.cpan/sources/authors/id/U/UM/UMEMOTO/Socket6-0.28.tar.gz ok

  CPAN.pm: Building U/UM/UMEMOTO/Socket6-0.28.tar.gz

checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether your Perl5 have PL_sv_undef... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for getaddrinfo... yes
checking for getnameinfo... yes
checking for gethostbyname2... yes
checking for getipnodebyname... no
checking for getipnodebyname in -lsocket... no
checking whether your system has IPv6 directory... no
checking for getipnodebyaddr... no
checking for getipnodebyaddr in -lsocket... no
checking whether your system has IPv6 directory... (cached) no
checking for inet_pton... yes
checking for inet_ntop... yes
checking for working inet_ntop... yes
checking whether you have sa_len in struct sockaddr... no
checking whether you have sin6_scope_id in struct sockaddr_in6... yes
checking for socklen_t... yes
configure: creating ./config.status
config.status: creating config.pl
config.status: creating gailookup.pl
config.status: creating config.h
Checking if your kit is complete...
Looks good
Writing Makefile for Socket6
cp Socket6.pm blib/lib/Socket6.pm
/usr/bin/perl /usr/share/perl5/vendor_perl/ExtUtils/xsubpp -noprototypes -typemap /usr/share/perl5/ExtUtils/typemap  Socket6.xs > Socket6.xsc && mv Socket6.xsc Socket6.c
gcc -c   -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic   -DVERSION=\"0.28\" -DXS_VERSION=\"0.28\" -fPIC "-I/usr/lib64/perl5/CORE"   Socket6.c
Socket6.xs: In function âXS_Socket6_getipnodebynameâ:
Socket6.xs:871:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  ST(0) = (SV *) not_here("getipnodebyname");
          ^
Socket6.c:1202:6: warning: variable âflagsâ set but not used [-Wunused-but-set-variable]
  int flags;
      ^
Socket6.c:1201:6: warning: variable âfamilyâ set but not used [-Wunused-but-set-variable]
  int family;
      ^
Socket6.c:1199:9: warning: unused variable âhostnameâ [-Wunused-variable]
  char * hostname = (char *)SvPV_nolen(ST(0))
         ^
Socket6.xs: In function âXS_Socket6_getipnodebyaddrâ:
Socket6.xs:942:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  ST(0) = (SV *) not_here("getipnodebyaddr");
          ^
Socket6.c:1277:7: warning: unused variable âaddress_svâ [-Wunused-variable]
  SV * address_sv = ST(1)
       ^
Socket6.c:1275:6: warning: unused variable âfamilyâ [-Wunused-variable]
  int family = (int)SvIV(ST(0))
      ^
Running Mkbootstrap for Socket6 ()
chmod 644 Socket6.bs
rm -f blib/arch/auto/Socket6/Socket6.so
gcc  -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,relro  Socket6.o  -o blib/arch/auto/Socket6/Socket6.so       \
        \

chmod 755 blib/arch/auto/Socket6/Socket6.so
cp Socket6.bs blib/arch/auto/Socket6/Socket6.bs
chmod 644 blib/arch/auto/Socket6/Socket6.bs
Manifying blib/man3/Socket6.3pm
  UMEMOTO/Socket6-0.28.tar.gz
  /bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/use.t .. ok
All tests successful.
Files=1, Tests=9,  0 wallclock secs ( 0.00 usr  0.00 sys +  0.01 cusr  0.00 csys =  0.01 CPU)
Result: PASS
  UMEMOTO/Socket6-0.28.tar.gz
  /bin/make test -- OK
Running make install
Manifying blib/man3/Socket6.3pm
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /usr/local/lib64/perl5/auto/Socket6/Socket6.so
Installing /usr/local/lib64/perl5/auto/Socket6/Socket6.bs
Installing /usr/local/lib64/perl5/Socket6.pm
Installing /usr/local/share/man/man3/Socket6.3pm
Appending installation info to /usr/lib64/perl5/perllocal.pod
  UMEMOTO/Socket6-0.28.tar.gz
  /bin/make install  -- OK
Running install for module 'IO::Socket::INET6'
Running make for S/SH/SHLOMIF/IO-Socket-INET6-2.72.tar.gz
Fetching with LWP:
http://www.namesdir.com/mirrors/cpan/authors/id/S/SH/SHLOMIF/IO-Socket-INET6-2.72.tar.gz
Fetching with LWP:
http://www.namesdir.com/mirrors/cpan/authors/id/S/SH/SHLOMIF/CHECKSUMS
Checksum for /root/.cpan/sources/authors/id/S/SH/SHLOMIF/IO-Socket-INET6-2.72.tar.gz ok

  CPAN.pm: Building S/SH/SHLOMIF/IO-Socket-INET6-2.72.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for IO::Socket::INET6
cp lib/IO/Socket/INET6.pm blib/lib/IO/Socket/INET6.pm
Manifying blib/man3/IO::Socket::INET6.3pm
  SHLOMIF/IO-Socket-INET6-2.72.tar.gz
  /bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/blocking.t .............. ok
t/configure6.t ............ ok
t/host6.t ................. ok
t/io_multihomed6.t ........ ok
t/io_sock6.t .............. ok
t/io_udp6.t ............... ok
t/listen_port_only.t ...... ok
t/pod-coverage.t .......... skipped: Test::Pod::Coverage 1.04 required for testing POD coverage
t/pod.t ................... skipped: Test::Pod 1.14 required for testing POD
t/style-trailing-space.t .. skipped: Test::TrailingSpace required for trailing space test.
All tests successful.
Files=10, Tests=43, 20 wallclock secs ( 0.03 usr  0.01 sys +  0.17 cusr  0.04 csys =  0.25 CPU)
Result: PASS
  SHLOMIF/IO-Socket-INET6-2.72.tar.gz
  /bin/make test -- OK
Running make install
Manifying blib/man3/IO::Socket::INET6.3pm
Installing /usr/local/share/perl5/IO/Socket/INET6.pm
Installing /usr/local/share/man/man3/IO::Socket::INET6.3pm
Appending installation info to /usr/lib64/perl5/perllocal.pod
  SHLOMIF/IO-Socket-INET6-2.72.tar.gz
  /bin/make install  -- OK
Net::HTTP is up to date (6.17).
[root@sadc3nagiost1 /]#
I rebooted the server and tried to add a host and it still throws the same error that vmware sdk perl is not installed.

I went thru the instructions provided by you again and this is the output

Code: Select all

[root@sadc3nagiost1 ~]# perl -MNagios::Plugin::Functions -le 'print $Nagios::Plugin::Functions::VERSION'
Can't locate Nagios/Plugin/Functions.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.

[root@sadc3nagiost1 ~]# cpan -i Nagios::Plugin::Functions
Reading '/root/.cpan/Metadata'
  Database was generated on Thu, 15 Mar 2018 20:17:03 GMT
Warning: Cannot install Nagios::Plugin::Functions, don't know what it is.
Try the command

    i /Nagios::Plugin::Functions/

to find objects with matching identifiers.
I have installed vMA as an alternative to use it with box293_check_vmware.pl.I am currently configuring it. If vMA works, I wouldnt go thru the pain of installing the vmware sdk perl. Which one do you think is the better option...Going with vMA or with VMWare SDK Perl?

Pls advice.

Thank You.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Unable to add ESXi host

Post by lmiltchev »

OK, can you try running the command below?

Code: Select all

cpan -i Nagios::Monitoring::Plugin
This should install the Nagios::Monitoring::Plugin module via cpan.
Which one do you think is the better option...Going with vMA or with VMWare SDK Perl?
Both have pros and cons. SDK is a pain to install sometimes, but once this is done, configuration is easier. VMware checks a CPU intensive, so running these checks locally on the Nagios XI server increases the load. When using the box293_check_vmware.pl plugin, you don't have this problem but configuration is more involved.

Keep in mind that vMA is being deprecated though:

https://blogs.vmware.com/vsphere/2017/0 ... ation.html
Be sure to check out our Knowledgebase for helpful articles and solutions!
rekhan
Posts: 7
Joined: Thu Mar 15, 2018 7:48 am

Re: Unable to add ESXi host

Post by rekhan »

Hi,

I went thru the documentation for vMA which has been deprecated. When we had a meeting with Shammas, he suggested to use vMA.

I have run the command suggested by you and here is the output
[root@sadc3nagiost1 ~]# cpan -i Nagios::Monitoring::Plugin
Reading '/root/.cpan/Metadata'
Database was generated on Sun, 18 Mar 2018 19:29:02 GMT
Nagios::Monitoring::Plugin is up to date (0.51).

I rebooted the server and tried to add vmware host and I still get an error that VMware SDK or ESX Plugins is not installed.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Unable to add ESXi host

Post by cdienger »

What version of the wizard are you using? This can be found under Admin > System Extensions > Manage Components. You may have a newer version that expects Nagios/Plugin/Functions.pm when in fact it is found under Nagios/Monitoring/Plugin/Functions.pm. Try editing /usr/local/nagios/libexec/check_esx3.pl and adding "use Nagios::Monitoring::Plugin;":

Code: Select all

$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
package CheckVMwareAPI;
use strict;
use warnings;
use vars qw($PROGNAME $VERSION $output $values $result $defperfargs);
use Nagios::Plugin::Functions qw(%STATUS_TEXT);
use Nagios::Plugin;
use Nagios::Monitoring::Plugin;  <-------------------- ADD THIS LINE
use File::Basename;
use HTTP::Date;
use Data::Dumper qw(Dumper);
...
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rekhan
Posts: 7
Joined: Thu Mar 15, 2018 7:48 am

Re: Unable to add ESXi host

Post by rekhan »

Hi,

Thank you for the response.

I am not sure which component version you are looking for as I can see many components and their versions.

I added the line as suggested by you. use Nagios::Monitoring::Plugin;

As we cant keep living with this issue, i reverted the Nagios instance to a working snapshot and was able to add hosts.

However when I try to add vcenter server instead of individual hosts, Nagios considers it as any other OS and doesnot pull out hosts, datastores, networks or other components of vCenter Server. And for ESXi hosts, the memory utilization is not showing up. Is this a bug that memory utilization will not show up for ESXi hosts. The version we are using is 6.5 U1 Patch 2.
Locked