Page 1 of 2

ESXi Hardware Monitoring using check_esxi_hardware.py

Posted: Thu Aug 10, 2017 12:23 am
by bsivavani
Hi,

We are trying to monitor hardware health of ESXi server using plugin check_esxi_hardware.py, but we received below error

[root@s930l3301 tmp]# ./check_esxi_hardware.py -H s930e0130.rwe.com -U testusr -P testusr123
Traceback (most recent call last):
File "./check_esxi_hardware.py", line 617, in <module>
wbemclient = pywbem.WBEMConnection(hosturl, (user,password), no_verification=True)
TypeError: __init__() got an unexpected keyword argument 'no_verification'
[root@s930l3301 tmp]#

Kindly advice.

Re: ESXi Hardware Monitoring using check_esxi_hardware.py

Posted: Thu Aug 10, 2017 2:57 am
by fuchstiger
Have you installed the following package?
pywbem.noarch 0.7.0-25.20130827svn625.el7 @base

Re: ESXi Hardware Monitoring using check_esxi_hardware.py

Posted: Thu Aug 10, 2017 4:15 am
by bsivavani
Hi,

Yes. I have installed pywbem, I am using CentOS 6.8 OS.

[root@s930l3301 tmp]# rpm -qa | grep pywbem
pywbem-0.7.0-4.el6.noarch
[root@s930l3301 tmp]#

Re: ESXi Hardware Monitoring using check_esxi_hardware.py

Posted: Thu Aug 10, 2017 8:18 am
by tacolover101
what version of the plugin are you using? this was a known issue in the past - https://github.com/Napsty/check_esxi_hardware/issues/7 - may be best to submit a bug report here if you can't get it working since that's the author's github.

Re: ESXi Hardware Monitoring using check_esxi_hardware.py

Posted: Thu Aug 10, 2017 8:51 am
by bsivavani
We are using the below link and version is 20160531.

https://exchange.nagios.org/directory/P ... py/details

Re: ESXi Hardware Monitoring using check_esxi_hardware.py

Posted: Thu Aug 10, 2017 2:10 pm
by tgriep
It looks like the plugin uses the CIM port (Port 5989) to gather the information.
If your server setup to allow connections to that port and is the server setup to allow polling it's information remotely?

Re: ESXi Hardware Monitoring using check_esxi_hardware.py

Posted: Wed Aug 16, 2017 7:38 am
by bsivavani
Yes. Both ports were opened in remote server.

From Nagios server
[root@s930l3301 tmp]# ./check_esxi_hardware.py -H s930e0130.rwe.com -U testusr -P testusr123 -v
20170816 14:32:38 Connection to https://s930e0130.rwe.com
20170816 14:32:38 Found pywbem version 0.7.0
20170816 14:32:40 Connection error, disable SSL certification verification (probably patched pywbem)
Traceback (most recent call last):
File "./check_esxi_hardware.py", line 617, in <module>
wbemclient = pywbem.WBEMConnection(hosturl, (user,password), no_verification=True)
TypeError: __init__() got an unexpected keyword argument 'no_verification'
[root@s930l3301 tmp]#

From Nagios server
[root@s930l3301 ~]# netstat -an | grep 5989
tcp 0 0 10.87.217.84:45780 10.87.176.73:5989 TIME_WAIT
[root@s930l3301 ~]#

From ESXi server
[root@s930e0130:~] lsof -i -p -n | grep 5989

35719 sfcb-HTTPS-Daem SOCKET_INET 9 0.0.0.0 :5989

[root@s930e0130:~] lsof -i -p -n | grep 443

34609 net-cdp MMAP -1 /usr/sbin/net-cdp (prot:--/len:4432)

34244 rhttpproxy-work SOCKET_INET 6 0.0.0.0 :443

34244 rhttpproxy-work SOCKET_INET 12 10.87.176.73 :443

34244 rhttpproxy-work SOCKET_INET 14 10.87.176.73 :443

34244 rhttpproxy-work SOCKET_INET 16 10.87.176.73 :443

34244 rhttpproxy-work SOCKET_INET 18 10.87.176.73 :443


Kindly advice pls ?

Re: ESXi Hardware Monitoring using check_esxi_hardware.py

Posted: Wed Aug 16, 2017 1:03 pm
by tgriep
It looks like the plugin needs a newer version of the pywbem to run so you can try and install a newer one bu running

Code: Select all

pip install pywbem
Also, upgrade the plugin to this version at the link below.
https://github.com/Napsty/check_esxi_ha ... ardware.py

If it still fails after doing the above, verify that the username and password it correct and if they are, you would have to contact the author of the plugin.

Re: ESXi Hardware Monitoring using check_esxi_hardware.py

Posted: Thu Aug 17, 2017 8:34 am
by bsivavani
Installed pywbem version - 0.8.0-dev

Receiving below error and verified username and password are correct.
[root@s930l3301 tmp]# /tmp/check_esxi_hardware.py -H s930e0130.rwe.com -U testusr -P Test123456 -v
20170817 15:31:01 Connection to https://s930e0130.rwe.com
20170817 15:31:01 Found pywbem version 0.8.0-dev
20170817 15:31:01 Check classe OMC_SMASHFirmwareIdentity
20170817 15:31:03 Global exit set to UNKNOWN
UNKNOWN: Authentication Error
[root@s930l3301 tmp]#

Re: ESXi Hardware Monitoring using check_esxi_hardware.py

Posted: Thu Aug 17, 2017 8:58 am
by tgriep
Try specifying the vendor code when running the command and see if that helps.

Code: Select all

--vendor dell, hp, ibm, intel
It could be that the plugin cannot determine the hardware type and then cannot authenticate.
Or
1. Make sure you are either using the ESXi root user or that you create a user which is member of the root group.
2. The password you are using has some special characters like a question mark and you need to quote them.
3. The password you are using has a Dollar sign ($) which you need to single-quote.