ESXi Hardware Monitoring using check_esxi_hardware.py

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

ESXi Hardware Monitoring using check_esxi_hardware.py

Post 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.
fuchstiger
Posts: 22
Joined: Tue Apr 12, 2016 7:42 am

Re: ESXi Hardware Monitoring using check_esxi_hardware.py

Post by fuchstiger »

Have you installed the following package?
pywbem.noarch 0.7.0-25.20130827svn625.el7 @base
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Re: ESXi Hardware Monitoring using check_esxi_hardware.py

Post 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]#
User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: ESXi Hardware Monitoring using check_esxi_hardware.py

Post 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.
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Re: ESXi Hardware Monitoring using check_esxi_hardware.py

Post by bsivavani »

We are using the below link and version is 20160531.

https://exchange.nagios.org/directory/P ... py/details
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: ESXi Hardware Monitoring using check_esxi_hardware.py

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Re: ESXi Hardware Monitoring using check_esxi_hardware.py

Post 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 ?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: ESXi Hardware Monitoring using check_esxi_hardware.py

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Re: ESXi Hardware Monitoring using check_esxi_hardware.py

Post 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]#
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: ESXi Hardware Monitoring using check_esxi_hardware.py

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked