unable to monitor vmware 6.7 via MSW

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: unable to monitor vmware 6.7 via MSW

Post by dlukinski »

cdienger wrote:I'm referring just to the steps to install the SDK that are covered in the document. The SDK must be installed on the MSW which appears to have failed if you don't' have a vcli.

Alright, Nagios manual is also incorrect:

1. cpan has to be installed before running pre-req commands or they would not run (please update the manual)

2. SDK step would not install because openssl-devel would be missing (please update the manual)

3. After all steps complete successfully, /usr/lib/vmware-cli does NOT exist.

------------------------------------------------------------------------------------------------
NAgios manual steps contradict VMWARE SDK for Perl steps (for CentOS, your stock OS), published in here - https://cyberground.hu/install-vmware-v ... -centos-7/

I've used Centos 7 minimal 2003 image to follow both manuals
-----------------------------------------------------------------------------------------------
Crypt-SSLeay failed to configure / downgrading LWP did not fix it
----------------------------------------------------------------------------------------------
Mixing 2 manuals worked (keep wondering if LWP downgrade did it and if I could re-create this one more time
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: unable to monitor vmware 6.7 via MSW

Post by cdienger »

Are you requesting https://assets.nagios.com/downloads/nag ... ios-XI.pdf be updated because of failures 1, 2, and 3? Just want to be sure as I go to test it again.

When you say 'mixing 2 manuals worked' are you referring to https://cyberground.hu/install-vmware-v ... -centos-7/ and our https://assets.nagios.com/downloads/nag ... ios-XI.pdf ?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: unable to monitor vmware 6.7 via MSW

Post by dlukinski »

cdienger wrote:Are you requesting https://assets.nagios.com/downloads/nag ... ios-XI.pdf be updated because of failures 1, 2, and 3? Just want to be sure as I go to test it again.

When you say 'mixing 2 manuals worked' are you referring to https://cyberground.hu/install-vmware-v ... -centos-7/ and our https://assets.nagios.com/downloads/nag ... ios-XI.pdf ?
Yes i did both manuals and downgraded LWP : got vcli in the end, not sure if operational.

This time vcli was there, but the check did not work:

Code: Select all

[vi-admin@cakc-bur-test02 ~]$  ~/box293_check_vmware.pl --server 172.18.18.19 --check
Can't locate Text/Template.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 25.
BEGIN failed--compilation aborted at /usr/share/perl5/VMware/SSOConnection.pm line 25.
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 /home/vi-admin/box293_check_vmware.pl line 630.
BEGIN failed--compilation aborted at /home/vi-admin/box293_check_vmware.pl line 630.
[vi-admin@cakc-bur-test02 ~]$

User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: unable to monitor vmware 6.7 via MSW

Post by cdienger »

Is Template.pm found on the machine? It may need to be installed or the script modified to look in the proper locatin. What OS is the MSW?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: unable to monitor vmware 6.7 via MSW

Post by dlukinski »

cdienger wrote:Is Template.pm found on the machine? It may need to be installed or the script modified to look in the proper locatin. What OS is the MSW?
It is CentOS 7.8 minimal.

I have installed CPAN Text::Template and was able to check the remote vCenter version

Will keep testing and update
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: unable to monitor vmware 6.7 via MSW

Post by dlukinski »

I am now getting the same error for all the checks: (Return code of 255 for service 'CPU Info' on host 'cakc-bur-esxi01.finland.tcscloud.com' was out of bounds)

and I am getting "plugin timed out" when trying to check_by_ssh remotely from Nagios to MSW machine
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: unable to monitor vmware 6.7 via MSW

Post by cdienger »

Is the check that the MSW machine tries to run quick to return? Time it with the following:

Code: Select all

time ./box293_check_vmware.pl --timeoute 90 --server 172.19.1.60 --check Host_CPU_Info --host cakc-bur-esxi01.finland.tcscloud.com --reporting_si CPU_Speed:GHz
Also try just running a simple ls via the check_by_ssh plugin:

Code: Select all

/usr/local/nagios/lib/check_by_ssh -E 1 -t 90 -l vi-admin -H <MSW_IP> -C "ls"
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: unable to monitor vmware 6.7 via MSW

Post by dlukinski »

cdienger wrote:Is the check that the MSW machine tries to run quick to return? Time it with the following:

Code: Select all

time ./box293_check_vmware.pl --timeoute 90 --server 172.19.1.60 --check Host_CPU_Info --host cakc-bur-esxi01.finland.tcscloud.com --reporting_si CPU_Speed:GHz
Also try just running a simple ls via the check_by_ssh plugin:

Code: Select all

/usr/local/nagios/lib/check_by_ssh -E 1 -t 90 -l vi-admin -H <MSW_IP> -C "ls"
This is the point I got to:

(after entering credentials into the credstore)
[vi-admin@cakc-bur-mswdev02 vmware-vsphere-cli-distrib]$ ~/box293_check_vmware.pl --server 172.18.18.13 --check vCenter_Name_Version
Enter username: kcvmamon@vsphere.local
Enter password:
UNKNOWN: Server version unavailable at 'https://172.18.18.13:443/sdk/vimService.wsdl' at /usr/share/perl5/VMware/VICommon.pm line 704.
[vi-admin@cakc-bur-mswdev02 vmware-vsphere-cli-distrib]$
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: unable to monitor vmware 6.7 via MSW

Post by cdienger »

Try:

Code: Select all

/usr/bin/vmware-cmd --version
~/box293_check_vmware.pl --server 172.18.18.13 --check vCenter_Name_Version --debug
Provide the output and the /home/vi-admin/box293_check_vmware_debug_log.txt if it is created.

I'd also like to see a packet capture taken at the same time the above command is run:

Code: Select all

tcpdump -s 0 -i any host 172.18.18.13 -w output.pcap
Use CTRL+C to stop the trace after reproducing the problem and send me the output.pcap it creates in a private message.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: unable to monitor vmware 6.7 via MSW

Post by dlukinski »

cdienger wrote:Try:

Code: Select all

/usr/bin/vmware-cmd --version
~/box293_check_vmware.pl --server 172.18.18.13 --check vCenter_Name_Version --debug
Provide the output and the /home/vi-admin/box293_check_vmware_debug_log.txt if it is created.

I'd also like to see a packet capture taken at the same time the above command is run:

Code: Select all

tcpdump -s 0 -i any host 172.18.18.13 -w output.pcap
Use CTRL+C to stop the trace after reproducing the problem and send me the output.pcap it creates in a private message.
Hi again

I managed to get the plugin to work, but it keeps asking me for the credentials (even so they were entered successfully):

Code: Select all

[vi-admin@cakc-bur-mswdev02 ~]$ sudo /usr/lib/vmware-vcli/apps/general/credstore_admin.pl add --server 172.18.18.19 --username kcvmamon@vsphere.local
[sudo] password for vi-admin:
Enter password:
Re-enter password:
New entry added successfully
[vi-admin@cakc-bur-mswdev02 ~]$ sudo /usr/lib/vmware-vcli/apps/general/credstore_admin.pl add --server 172.19.1.60 --username kcvmamon@vsphere.local
[sudo] password for vi-admin:
Enter password:
Re-enter password:
New entry added successfully
[vi-admin@cakc-bur-mswdev02 ~]$ ~/box293_check_vmware.pl --server 172.19.1.60 --check vCenter_Name_Version
Enter username: kcvmamon@vsphere.local
Enter password:
OK: VMware vCenter Server 6.7.0 build-16709110
[vi-admin@cakc-bur-mswdev02 ~]$
Locked