Closed aabdelaidoum closed 6 years ago
Correstion: just re-checked, i'm using vSphere SDK for Perl version: 6.0.0...:/
6.0.0 has more bugs than an old dog fleas. Tested is 5.x . 6.5 is reported to work but not tested by me. Regards Martin
Hello, thank you @uclara I tried the pull request #127 but didn't work. Still have the same warning message.
@BaldMansMojo : today I tested the plugin with sdk 5.5 but still have the warning message about expired session file when monitoring host with ESX 6.5.
For your information, I also tried using the plugin "check_vmware_api.p"l and i get the same warning message : ./check_vmware_api.pl -S /rico/sessfile -f /rico/auth_file -H 172.16.3.7 -l MEM Warning: The session being saved to '/rico/sessfile' is expired or not authenticated. Thanks
Remove the sessions file. It contais a non valid session.
hello Martin, Yes, I always delete session files during my tests and I still get the warning message. I've checked Vsphere SDK documentation of version 6.5 and compared it to older versions, session management has not changed ...very strange. Below the Perl and SDK version i'm using on a CentOS Linux release 7.4.1708 :
This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi (with 33 registered patches, see perl -V for more detail)
vSphere SDK for Perl version: 5.5.0 Script 'vmware-cmd' version: 5.5.0
Thanks
@aabdelaidoum @BaldMansMojo Hello, I have the same problem also mention in #108
Here my SDK version :
/usr/bin/vmware-cmd --version
vSphere SDK for Perl version: 5.5.0
Script 'vmware-cmd' version: 5.5.0
The session file just after a deletion look like this :
#LWP-Cookies-1.0
Set-Cookie3: vmware_soap_session="\"1f7f96e20aeb348f3664994c7cce78535ffe7b47\""; path="/"; domain=192.168.230.3; path_spec; secure; discard; HttpOnly; version=0
@uclara I try the pull request #127 but same issue occurs again.
Any ideas ?
Thank's a lot.
Until today I had the same problem. It only seems to happen when you try to monitor vsphere 6.5 machines with SDK 5.5. Please update your vSphere SDK for Perl from 5.5.0 to 6.5.0. This solved the problem for me.
Hello @K0nne, Thank you ! Now that i read your answer, sounds logical to upgrade to SDK 6.5 (and not 6.0) to monitor vsphere 6.5 hosts :) I've made a test and it works ! I'll make some retro-compatibilty tests of this plugin with SDK version 6.5 and Vsphere 5.0 to 6.5 hosts and let you know. Razak
Sorry for the late answer but I had to do a lot of other stuff.
The pull request from SNI fixes a problem with SDK 6.x but SDK 6.x is not needed (and not tested by me) as long as no ESX 6.x specifific feature has to be monitored. 5.x works fine. SDK 6.5 is reported to work. Below that version the SDK had more bugs than an old dog fleas.
I think it's a problem with liebwww-perl and the SDK (see https://monitoring-portal.org/index.php?thread/31610-solved-check-vmware-esx-pl-soap-request-error-seit-perl-sdk-5-5/ - unfortunately in German) and here https://www.claudiokuenzler.com/blog/650/slow-vmware-perl-sdk-soap-request-error-libwww-version .
I think that should fix the problem. You get the same warning with check_vmware_api.pl because the problem ist based on the Perl module and neither Perl itself or the plugin.
I hope that I will have the time in January to set up a testmachine with SDK 6.x. Most of our Linux machines here are running with Centos 7.x but not my Nagios cluster because some things easy to do with init scripts are not so easy to do with that damned systemd.
Regards - Martin
@K0nne perfect, no more troubles with SDK 6.5 !
@BaldMansMojo before update the SDK, I try to used the libwww-perl in 5.837 like in the secnd link, but had the same issue.
Solved with SDK 6.5. Thank's.
Short question, updating SDK to 6.5 will it brake monitoring of vcenters on version 5.5? Thanks.
SDK 6.5 works well with esxi/vcenter 5.5
Thanks. I've currently no SDK 6.5 running
Under "normal" conditions everything should work now. SDK 6.5 worked here at my job without any problems with the original check with CentOS7/RHEL7. But now I merged most pull request and there should not be any problem anymore.
Hello, First, thanks for this usefull plugin and all the work done ! I'm using an EXSi 6.5 vmware host and with the plugin, I get a warning message that appears in the output, in the first line, which breaks the monitoring of the ESXi 6.5 host. This plugin works well with previous version of ESXi (6 and 5 ) but not yet with version 6.5 . I'm using version SDK 5.x. I also tried some solutions proposed in this "Issues" tab or "Pull requests", but none works.
Below the warning message I get : ./check_vmware_esx --sessionfiledir=/var/spool/nagios -f /usr/lib64/nagios/plugins/esx_auth -H 172.17.1.7 -S volumes Warning: The session being saved to '/var/spool/nagios/172.17.1.7_session' is expired or not authenticated. OK for all selected volumes. 30.3datastore (VMFS) free: 3725812.00 MB (48.84%) / 7628544.00 MB (100%) .... .....
Thanks for your help