Page 2 of 3

Re: unable to monitor vmware 6.7 via MSW

Posted: Wed Oct 21, 2020 2:05 pm
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

Re: unable to monitor vmware 6.7 via MSW

Posted: Thu Oct 22, 2020 4:22 pm
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 ?

Re: unable to monitor vmware 6.7 via MSW

Posted: Mon Oct 26, 2020 9:37 am
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 ~]$


Re: unable to monitor vmware 6.7 via MSW

Posted: Tue Oct 27, 2020 9:15 am
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?

Re: unable to monitor vmware 6.7 via MSW

Posted: Mon Nov 23, 2020 5:31 pm
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

Re: unable to monitor vmware 6.7 via MSW

Posted: Mon Nov 23, 2020 5:55 pm
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

Re: unable to monitor vmware 6.7 via MSW

Posted: Tue Nov 24, 2020 2:58 pm
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"

Re: unable to monitor vmware 6.7 via MSW

Posted: Wed Jan 20, 2021 6:21 pm
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: [email protected]
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]$

Re: unable to monitor vmware 6.7 via MSW

Posted: Thu Jan 21, 2021 5:44 pm
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.

Re: unable to monitor vmware 6.7 via MSW

Posted: Wed Jan 27, 2021 11:48 am
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 [email protected]
[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 [email protected]
[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: [email protected]
Enter password:
OK: VMware vCenter Server 6.7.0 build-16709110
[vi-admin@cakc-bur-mswdev02 ~]$