One of our customers recently asked us to setup Nagios plugin check_esxi_hardware.py
from Claudio Kuenzler on its CentOS 6 monitoring server. On this distribution the main package required to run the plugin is pywbem
, which is available from the standard CentOS 6 YUM repository in version 0.7.0 (package python-setuptools
is also required to run the check).
The plugin uses WBEM to retrieve hardware health information through HTTPS on port 5989 by default. Since your ESXi probably uses a self-signed SSL/TLS certificate, you should end-up with the following error when running check_esxi_hardware.py
with the pywbem
0.7.0 package from EL6:
[admin@poller6 ~]$ ./check_esxi_hardware.py -H 10.109.21.16 -U monitoring -P ******** -v 20171227 20:03:35 LCD Status: True 20171227 20:03:35 Connection to https://10.109.21.16 20171227 20:03:35 Found pywbem version 0.7.0 20171227 20:03:35 Connection error, disable SSL certification verification (probably patched pywbem) Traceback (most recent call last): File "./check_esxi_hardware.py", line 633, in <module> wbemclient = pywbem.WBEMConnection(hosturl, (user,password), no_verification=True) TypeError: __init__() got an unexpected keyword argument 'no_verification'
To address this issue we have updated the pywbem
package to version 0.11.0. Our updated spec file is based on the one present in CentOS 6 source RPM pywbem-0.7.0-4.el6.src.rpm
and is available on Github in our pkg-pywbem
repository. The python-ply
dependency is available from the EPEL 6 repository; other dependencies are available in the standard CentOS 6 repository. Install the RPM with YUM to handle the dependencies automatically.
Resources:
- pywbem.spec
- pywbem-0.11.0-1.el6.zenetys.noarch.rpm (SHA256 961bfff1b8f771c1ad3df825591552841855991e937c2c0e486f434acc12bdb3)
- pywbem-0.11.0-1.el6.zenetys.src.rpm (SHA256 ace8af62098b2809eac1a34a86ae560ba4fa4720ca468d64340d56b406352adc)