check_esxi_hardware icon indicating copy to clipboard operation
check_esxi_hardware copied to clipboard

cim_operations error

Open tcapacci opened this issue 3 years ago • 10 comments

I am using Ubuntu, the srip[t used to work great but since a few months I am getting:

nag@nag01:~# /usr/local/nagios/libexec/check_esxi_hardware.py -H 10.129.175.102 -U root -P Passw0rd! Traceback (most recent call last): File "/usr/local/nagios/libexec/check_esxi_hardware.py", line 781, in except pywbem.cim_operations.CIMError as args: AttributeError: 'module' object has no attribute 'cim_operations'

tcapacci avatar Nov 11 '21 14:11 tcapacci

Please run the plugin in verbose mode. What has changed since it stopped working? OS Upgrade? ESXi upgrade? Python change?

Napsty avatar Nov 11 '21 14:11 Napsty

I did a dist-upgrade on my Ubuntu server

The verbose mode is:

/usr/local/nagios/libexec/check_esxi_hardware.py -H 10.129.175.102 -U root -P Dell123! -v 20211111 15:56:39 LCD Status: True 20211111 15:56:39 Chassis Intrusion Status: True 20211111 15:56:39 Connection to https://10.129.175.102 20211111 15:56:39 Found pywbem version 1.1.2 20211111 15:56:39 Check classe OMC_SMASHFirmwareIdentity Traceback (most recent call last): File "/usr/local/nagios/libexec/check_esxi_hardware.py", line 781, in except pywbem.cim_operations.CIMError as args: AttributeError: 'module' object has no attribute 'cim_operations'

tcapacci avatar Nov 11 '21 14:11 tcapacci

@tcapacci thx for the quick response. Can you upgrade pywbem to 1.2.0? See my recent successful tests on https://www.claudiokuenzler.com/blog/1110/check_esxi_hardware-esxi-compatibility-matrix-list

Napsty avatar Nov 11 '21 14:11 Napsty

Thanks to you!

Just did but same message

root@remcorpnag01:~# /usr/local/nagios/libexec/check_esxi_hardware.py -H 10.129.175.102 -U root -P Dell123! -v 20211111 16:02:51 LCD Status: True 20211111 16:02:51 Chassis Intrusion Status: True 20211111 16:02:51 Connection to https://10.129.175.102 20211111 16:02:51 Found pywbem version 1.2.0 20211111 16:02:51 Check classe OMC_SMASHFirmwareIdentity Traceback (most recent call last): File "/usr/local/nagios/libexec/check_esxi_hardware.py", line 781, in except pywbem.cim_operations.CIMError as args: AttributeError: 'module' object has no attribute 'cim_operations'

tcapacci avatar Nov 11 '21 15:11 tcapacci

OK, weird. What happens if you use -V dell as an argument?

Napsty avatar Nov 11 '21 15:11 Napsty

same message

tcapacci avatar Nov 12 '21 13:11 tcapacci

Running out of ideas here... Can you try to remove and (re-) install the OMSA bundle? Certain versions are known to cause problems (see FAQ). You may also have to try the custom DELL ESXi ISO to see if it works there. Another workaround is to disable (comment) the OMC_SMASHFirmwareIdentity class in the plugin (around line 304): https://github.com/Napsty/check_esxi_hardware/blob/master/check_esxi_hardware.py#L304. This way you can rule out a general problem of the CIM server.

Napsty avatar Nov 12 '21 13:11 Napsty

did disabling OMC_SMASHFirmwareIdentity worked ? i look forward to suggestions

lasag-2511 avatar Sep 09 '22 15:09 lasag-2511

any update

lasag-2511 avatar Oct 18 '22 10:10 lasag-2511

I manged to work around this bug using

sudo python2 -m pip install --upgrade pywbem==0.8.4

on raspbian bullseye.

daCaPo avatar Dec 06 '22 16:12 daCaPo