Vmware plugin not working as Nagios User

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Vmware plugin not working as Nagios User

Post by ssax »

Please attach this file:

Code: Select all

/usr/local/nagios/libexec/check_esx3.pl
ksafa
Posts: 91
Joined: Wed Jan 15, 2014 3:05 pm

Re: Vmware plugin not working as Nagios User

Post by ksafa »

Attached
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: Vmware plugin not working as Nagios User

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
ksafa
Posts: 91
Joined: Wed Jan 15, 2014 3:05 pm

Re: Vmware plugin not working as Nagios User

Post 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;;
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Vmware plugin not working as Nagios User

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
ksafa
Posts: 91
Joined: Wed Jan 15, 2014 3:05 pm

Re: Vmware plugin not working as Nagios User

Post by ksafa »

Yes still getting the message "Using the default of SSL_verify_mode of SSL_VERIFY_NONE for client is deprecated" in output.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Vmware plugin not working as Nagios User

Post 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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
ksafa
Posts: 91
Joined: Wed Jan 15, 2014 3:05 pm

Re: Vmware plugin not working as Nagios User

Post by ksafa »

That did the trick! Thank you for all the help!

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

Re: Vmware plugin not working as Nagios User

Post by lmiltchev »

I am glad I could help! :)
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked