Page 2 of 2
Re: Vmware plugin not working as Nagios User
Posted: Wed Dec 26, 2018 3:00 pm
by ssax
Please attach this file:
Code: Select all
/usr/local/nagios/libexec/check_esx3.pl
Re: Vmware plugin not working as Nagios User
Posted: Thu Dec 27, 2018 3:01 pm
by ksafa
Attached
Re: Vmware plugin not working as Nagios User
Posted: Thu Dec 27, 2018 4:06 pm
by npolovenko
@ksafa, I would highly recommend uninstalling the VMWare SDK 6.7 and installing SDK 6.5 instead. We had quite a few compatibility issues with the latest SDK.
Run the vmware-uninstall-vSphere-CLI.pl script to uninstall the SDK 6.7. On my server its located in:
/tmp/vmware-vsphere-cli-distrib/bin/vmware-uninstall-vSphere-CLI.pl
But you can search with
find / -name vmware-uninstall-vSphere-CLI.pl.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
https://code.vmware.com/web/sdk/6.5/vsphere-perl
Re: Vmware plugin not working as Nagios User
Posted: Sat Dec 29, 2018 9:40 am
by ksafa
Seems to have made some improvement since at least I get check results now but i get the following error repeated several times before the output. This is only when i run as nagios user from command line, if i run as root i do not receive this message.
$ /usr/local/nagios/libexec/check_esx3.pl -f /usr/local/nagiosxi/etc/components/vmware/ESX1_auth.txt -H ESX1 -l MEM
*******************************************************************
Using the default of SSL_verify_mode of SSL_VERIFY_NONE for client
is deprecated! Please set SSL_verify_mode to SSL_VERIFY_PEER
possibly with SSL_ca_file|SSL_ca_path for verification.
If you really don't want to verify the certificate and keep the
connection open to Man-In-The-Middle attacks please set
SSL_verify_mode explicitly to SSL_VERIFY_NONE in your application.
*******************************************************************
at /usr/lib64/perl5/LWP/Protocol/http.pm line 31.
*******************************************************************
Using the default of SSL_verify_mode of SSL_VERIFY_NONE for client
is deprecated! Please set SSL_verify_mode to SSL_VERIFY_PEER
possibly with SSL_ca_file|SSL_ca_path for verification.
If you really don't want to verify the certificate and keep the
connection open to Man-In-The-Middle attacks please set
SSL_verify_mode explicitly to SSL_VERIFY_NONE in your application.
*******************************************************************
at /usr/lib64/perl5/LWP/Protocol/http.pm line 31.
*******************************************************************
Using the default of SSL_verify_mode of SSL_VERIFY_NONE for client
is deprecated! Please set SSL_verify_mode to SSL_VERIFY_PEER
possibly with SSL_ca_file|SSL_ca_path for verification.
If you really don't want to verify the certificate and keep the
connection open to Man-In-The-Middle attacks please set
SSL_verify_mode explicitly to SSL_VERIFY_NONE in your application.
*******************************************************************
at /usr/lib64/perl5/LWP/Protocol/http.pm line 31.
CHECK_ESX3.PL OK - mem usage=941375.27 MB (44.89%), overhead=0.00 MB, swapped=0.00 MB, memctl=0.00 MB | mem_usagemb=941375.27MB;; mem_usage=44.89%;; mem_overhead=0.00MB;; mem_swap=0.00MB;; mem_memctl=0.00MB;;
Re: Vmware plugin not working as Nagios User
Posted: Wed Jan 02, 2019 10:51 am
by lmiltchev
Try the following:
1. Open the check_esx3.pl plugin in a text editor, e.g. "vi", and add the following line on the top (after the comments):
Code: Select all
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
Save, and exit.
2. Test your check again. Are you still getting the "Using the default of SSL_verify_mode of SSL_VERIFY_NONE for client is deprecated" output?
Re: Vmware plugin not working as Nagios User
Posted: Thu Jan 03, 2019 10:28 am
by ksafa
Yes still getting the message "Using the default of SSL_verify_mode of SSL_VERIFY_NONE for client is deprecated" in output.
Re: Vmware plugin not working as Nagios User
Posted: Thu Jan 03, 2019 11:03 am
by lmiltchev
Some users reported that they fixed the issue by adding the following line to the check_esx3.pl plugin (on the top, below the comments):
Code: Select all
require IO::Socket::SSL; IO::Socket::SSL -> import(); IO::Socket::SSL::set_ctx_defaults( SSL_verify_mode => 0 );
I am not able to recreate the issue in-house, so I cannot test the "fix". You can however give it a try.
If this doesn't work, open a new ticket via our Support Center:
https://support.nagios.com/tickets/
We may need to schedule a remote session to further troubleshoot this issue. Thank you!
Re: Vmware plugin not working as Nagios User
Posted: Thu Jan 03, 2019 12:55 pm
by ksafa
That did the trick! Thank you for all the help!
Thank You,
Khaled
Re: Vmware plugin not working as Nagios User
Posted: Thu Jan 03, 2019 1:14 pm
by lmiltchev
I am glad I could help!
