Giter VIP home page Giter VIP logo

check_esxi_hardware's Introduction

check_esxi_hardware's People

Contributors

giner avatar lberra avatar mmarkgraf-tpgroup avatar napsty avatar peternewman avatar philrandal avatar stefaro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

check_esxi_hardware's Issues

CIM Server issues/timeouts with ESXi 6.7

CIM issues in ESXi 6.7

In the past weeks, several users have reported issues with check_esxi_hardware since ESXi version 6.7.

This ticket is here to retrieve more information to pinpoint the issue. So far multiple hardware vendors and server models are affected. Please comment on this issue if you experience similar issues.

As of today, June 12 2019, I have not heard any feedback from VMware and Dell. I reached out to both of them via Twitter.

Related tickets

#31
#34

Two issues depending on ESXi version and hardware

  1. ESXi 6.7 (both with and without update packs): CIM server seems to have stability issues on Supermicro hardware. Users reported in #34 manual restarts are required.
  2. ESXi 6.7 U2: CIM server doesn't seem to work at all on DELL EMC hardware, times out on all requests when "OpenManage" VIB is installed. -> Issue in Dell OpenManage. ESXi 6.7 U2 is not officially supported by OpenManage yet. Supposed to be fixed in Fall 2019.

Affected server vendors

  • Supermicro (for issue 1)
  • Dell (for issue 2)

Workarounds

Issue 1: Restart of CIM server using /sbin/services.sh restart
Issue 2: Uninstalling the "Openmanage" Offline Bundle VIB helps, the CIM server and therefore the plugin works again afterwards.

esxcli software vib remove --vibname=OpenManage

Feature Request - Storage Monitoring

Is it possible to add storage monitoring to the plugin (including both physical & virtual disks and/or data stores) and also allow the exclusion of storage monitoring (with something like -nodisk)?

The plugin currently reports actual/predicted drive failures in the warning message, but I currently use the plugin with Icinga2 and I have all the commands configured as separate services in a set, only each service is now failing because of a drive failure in the RAID.

image

Edit - for reference, this is on Dell PowerEdge hardware.

The --ignore option should support regex

if elementName in ignore_list :

It looks like the --ignore option expects a CSV list of static entries to ignore.

There are cases where it would be useful to ignore a range of entries.

Example:

20190430 08:46:07 Check classe VMware_StorageExtent
20190430 08:46:07   Element Name = Disk 1 on HPSA1 : Port 1I Box 1 Bay 1 : 186GB : Data Disk : Not Authenticated
20190430 08:46:07     Element HealthState = 10
20190430 08:46:07 Global exit set to WARNING
20190430 08:46:07   Element Name = Disk 2 on HPSA1 : Port 1I Box 1 Bay 2 : 186GB : Data Disk : Not Authenticated
20190430 08:46:07     Element HealthState = 10
20190430 08:46:07 Global exit set to WARNING
20190430 08:46:07   Element Name = Disk 3 on HPSA1 : Port 2I Box 1 Bay 7 : 558GB : Data Disk : OK
20190430 08:46:07     Element HealthState = 5
20190430 08:46:07   Element Name = Disk 4 on HPSA1 : Port 2I Box 1 Bay 8 : 558GB : Data Disk : OK
20190430 08:46:07     Element HealthState = 5

The first two disks are reported as "Not Authenticated" because they are 3rd party disks, not the officially-supported HP models. I would like to ignore this particular error. The Element Name is dynamic, so the --ignore option doesn't work.

If it accepted regex input, it could match. In this case, something like:

--ignore 'Disk (.+?) Data Disk : Not Authenticated'

ssl error

Hi

when I check the command it show me the following error.

./check_esxi_hardware.py -H IP –user=root –pass=xxxxxxxx
UNKNOWN: (0, ‘Socket error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)’)

I think it is an error with the CIM provider.

Error when using Esxi 5.5U1 IBM Custom Image

/usr/lib/nagios/plugins/check_esxi_hardware.py -H x.x.x.x -U root -P secret_pass -v -V ibm

20141104 18:40:38 Connection to https://x.x.x.x
20141104 18:40:38 Check classe OMC_SMASHFirmwareIdentity
20141104 18:40:38 Element Name = System BIOS
20141104 18:40:38 VersionString = -[D7E142AUS-1.71]-
20141104 18:40:38 Check classe CIM_Chassis
20141104 18:40:38 Element Name = Chassis
20141104 18:40:38 Manufacturer = IBM
20141104 18:40:38 SerialNumber = xxxxx
20141104 18:40:38 Model = IBM System x3550 M4: -[7914J3G]-
20141104 18:40:38 Element Op Status = 0
20141104 18:40:38 Check classe CIM_Card
Traceback (most recent call last):
File "/usr/lib/nagios/plugins/check_esxi_hardware1.py", line 625, in
verboseoutput(" Element Name = "+elementName)
TypeError: cannot concatenate 'str' and 'NoneType' objects

Version of plugin: = '20140319'
Regular Esxi 5.5U1 works fine.

Add memory and cpu

I am not sure how to code this one but I know we get alerts for memory and CPU, so it would be awesome if we could get perfdata off of that as well. I know there are some other plugins out there that pull this, but it's based off of SNMP and it's just not as reliable and "all-in-one" as this one. Just a thought for this, and hopefully it wouldn't be too hard to pull!

SSL problems with older ESXi

Hi,
I'm running these versions:
CentOS 8, kernel of Apr 9, 2020
nagios 4.4.5 from CentOS 8 epel repo
check_esxi_hardware.py of 20190701 (latest from master branch)
python 3.6 from CentOS 8 AppStream
first tested with python3-pywbem version 0.11.0 which is the default RPM version from CentOS

Working target system: hpe gen9 server with ESXi 6.7.0 Update 3 (Build 15160138)
The command correctly returns the failing points (e.g. power supply)

Failing Target system: Fujitsu Siemens Primergy TX300 S4
ESXi 5.1.0 build 1021289

command is run in the plugins folder.
./check_esxi_hardware.py -H the_server -U xxx -P yyy
fails with an SSL error during the first classe check (OMC_SMASHFirmwareIdentity). Details are below.

After a nice mail answer from Claudio, he pointed me to a likely outdated pywbem.

Hence, the RPM install of pywbem was removed, and a pip3 install was done as indicated in the FAQ. This has installed version 0.17.2 (which is the most recent one, from April 2020).
Test with the working system proved again that all works fine.

The test with the failing system stays the same. The output of the command (with the verbose option) is below:

20200601 01:07:47 LCD Status: True
20200601 01:07:47 Connection to https://<my-server-name>
20200601 01:07:47 Found pywbem version 0.17.2
20200601 01:07:47 Check classe OMC_SMASHFirmwareIdentity
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/pywbem/_cim_http.py", line 655, in connect
    return self.sock.connect((self.host, self.port))
  File "/usr/lib64/python3.6/ssl.py", line 1065, in connect
    self._real_connect(addr, False)
  File "/usr/lib64/python3.6/ssl.py", line 1056, in _real_connect
    self.do_handshake()
  File "/usr/lib64/python3.6/ssl.py", line 1033, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/lib64/python3.6/ssl.py", line 645, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: UNSUPPORTED_PROTOCOL] unsupported protocol (_ssl.c:897)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./check_esxi_hardware.py", line 720, in <module>
    instance_list = wbemclient.EnumerateInstances(classe)
  File "/usr/local/lib/python3.6/site-packages/pywbem/_cim_operations.py", line 2494, in EnumerateInstances
    **extra)
  File "/usr/local/lib/python3.6/site-packages/pywbem/_cim_operations.py", line 1763, in _imethodcall
    conn_id=self.conn_id)
  File "/usr/local/lib/python3.6/site-packages/pywbem/_cim_http.py", line 824, in wbem_request
    client.endheaders()
  File "/usr/lib64/python3.6/http/client.py", line 1249, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib64/python3.6/http/client.py", line 1036, in _send_output
    self.send(msg)
  File "/usr/local/lib/python3.6/site-packages/pywbem/_cim_http.py", line 483, in send
    self.connect()  # pylint: disable=no-member
  File "/usr/local/lib/python3.6/site-packages/pywbem/_cim_http.py", line 661, in connect
    conn_id=conn_id)
pywbem._exceptions.ConnectionError: SSL error <class 'ssl.SSLError'>: [SSL: UNSUPPORTED_PROTOCOL] unsupported protocol (_ssl.c:897); OpenSSL version: OpenSSL 1.1.1c FIPS  28 May 2019

If you need detail command output from within this ESXi, I can provide these.
Thanks to have a look into this.

The script doesn't work on Ubuntu 20.04

./check_esxi_hardware.py
Traceback (most recent call last):
File "./check_esxi_hardware.py", line 287, in
import pywbem
ImportError: No module named pywbem

apt install python-pywbem

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-pywbem is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
sblim-wbemcli

I've installed sblim-wbemcli package but it didn't resolve the issue

Unknown Memory Issue

We are seeing an odd memory error where i cant pinpoint the source. When looking in vCenter at the host, there are no issues listed, when logging into the HP iLo, there are also no issues noted. When running this script the following output is displayed (I have included the verbose output with the IP, SN and host name masked). The issue line seems to be with these specific lines:

20200414 07:14:13 Element Name = Memory 20200414 07:14:13 Element Op Status = 7

And I would like to get a little more understanding of where this is being pulled from to try to identify the actual issue. It would be useful to have the scrip give some more detail, if the actual issue could be identified too perhaps.

CRITICAL : Memory - Server: HP ProLiant ML350p Gen8 s/n: XXXXXXXXXXXXXX System BIOS: P72 2015-07-01

20200414 07:14:10 LCD Status: True 20200414 07:14:10 Connection to https://X.X.X.X 20200414 07:14:10 Found pywbem version 0.11.0 20200414 07:14:10 Check classe OMC_SMASHFirmwareIdentity 20200414 07:14:11 Element Name = System BIOS 20200414 07:14:11 VersionString = P72 20200414 07:14:11 Check classe CIM_Chassis 20200414 07:14:11 Element Name = Chassis 20200414 07:14:11 Manufacturer = HP 20200414 07:14:11 SerialNumber = XXXXXXXXXXXXXX 20200414 07:14:11 Model = ProLiant ML350p Gen8 20200414 07:14:11 Element Op Status = 0 20200414 07:14:11 Check classe CIM_Card 20200414 07:14:11 Check classe CIM_ComputerSystem 20200414 07:14:12 Element Name = System Management Module 6:1 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = System Board 7:1 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = System Board 7:2 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = System Board 7:3 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = System Board 7:4 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = System Board 7:5 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = System Board 7:6 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = Add-in Card 11:1 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = Add-in Card 11:2 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = Add-in Card 11:3 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = Add-in Card 11:4 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = Add-in Card 11:5 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = Add-in Card 11:6 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = Add-in Card 11:7 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = Add-in Card 11:8 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = Add-in Card 11:9 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = System Internal Expansion Board 16:1 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = System Internal Expansion Board 16:2 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = System Internal Expansion Board 16:3 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = System Internal Expansion Board 16:4 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = System Internal Expansion Board 16:5 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = System Internal Expansion Board 16:6 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = System Internal Expansion Board 16:7 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = System Internal Expansion Board 16:8 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = System Internal Expansion Board 16:9 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = XXXXXXXXXX 20200414 07:14:12 Element Name = Hardware Management Controller (Node 0) 20200414 07:14:12 Element Op Status = 0 20200414 07:14:12 Element Name = HP Smart Array P420i Controller : Embedded : HPSA1 20200414 07:14:12 Check classe CIM_NumericSensor 20200414 07:14:13 Element Name = System Board 5 Power Meter 20200414 07:14:13 sensorType = 4 - Current 20200414 07:14:13 BaseUnits = 7 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 228.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Power Supply 2 Power Supply 2: Presence detected 20200414 07:14:13 sensorType = 11 - Presence 20200414 07:14:13 BaseUnits = 7 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 60.000000 20200414 07:14:13 Element Name = Power Supply 2 Power Supply 2: Failure status 20200414 07:14:13 sensorType = 1 - Other 20200414 07:14:13 BaseUnits = 7 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 60.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Power Supply 2 Power Supply 2: Power Supply AC lost 20200414 07:14:13 sensorType = 13 - Power Consumption 20200414 07:14:13 BaseUnits = 7 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 60.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Power Supply 1 Power Supply 1: Presence detected 20200414 07:14:13 sensorType = 11 - Presence 20200414 07:14:13 BaseUnits = 7 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 95.000000 20200414 07:14:13 Element Name = Power Supply 1 Power Supply 1: Failure status 20200414 07:14:13 sensorType = 1 - Other 20200414 07:14:13 BaseUnits = 7 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 95.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Power Supply 1 Power Supply 1: Power Supply AC lost 20200414 07:14:13 sensorType = 13 - Power Consumption 20200414 07:14:13 BaseUnits = 7 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 95.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = System Board 4 Fan 4 20200414 07:14:13 sensorType = 5 - Tachometer 20200414 07:14:13 BaseUnits = 65 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 6.270000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = System Board 3 Fan 3 20200414 07:14:13 sensorType = 5 - Tachometer 20200414 07:14:13 BaseUnits = 65 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 6.270000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = System Board 2 Fan 2 20200414 07:14:13 sensorType = 5 - Tachometer 20200414 07:14:13 BaseUnits = 65 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 30.960000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = System Board 1 Fan 1 20200414 07:14:13 sensorType = 5 - Tachometer 20200414 07:14:13 BaseUnits = 65 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 30.960000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Power Distribution 2 46-P/S Board 2 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 35.000000 20200414 07:14:13 Upper Threshold Critical = 57.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Power Distribution 1 45-P/S Board 1 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 36.000000 20200414 07:14:13 Upper Threshold Critical = 57.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = System Internal Expansion Board 9 44-PCI 9 Zone 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 28.000000 20200414 07:14:13 Upper Threshold Critical = 70.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = System Internal Expansion Board 8 43-PCI 8 Zone 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 28.000000 20200414 07:14:13 Upper Threshold Critical = 70.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = System Internal Expansion Board 7 42-PCI 7 Zone 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 29.000000 20200414 07:14:13 Upper Threshold Critical = 70.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = System Internal Expansion Board 6 41-PCI 6 Zone 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 30.000000 20200414 07:14:13 Upper Threshold Critical = 70.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = System Internal Expansion Board 5 40-PCI 5 Zone 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 31.000000 20200414 07:14:13 Upper Threshold Critical = 70.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = System Internal Expansion Board 4 39-PCI 4 Zone 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 43.000000 20200414 07:14:13 Upper Threshold Critical = 70.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = System Internal Expansion Board 3 38-PCI 3 Zone 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 41.000000 20200414 07:14:13 Upper Threshold Critical = 70.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = System Internal Expansion Board 2 37-PCI 2 Zone 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 40.000000 20200414 07:14:13 Upper Threshold Critical = 70.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = System Internal Expansion Board 1 36-PCI 1 Zone 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 39.000000 20200414 07:14:13 Upper Threshold Critical = 70.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Other 4 26-LOM 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 48.000000 20200414 07:14:13 Upper Threshold Critical = 100.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = System Management Module 1 25-iLO Zone 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 27.000000 20200414 07:14:13 Upper Threshold Critical = 80.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Other 3 24-HD Controller 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 83.000000 20200414 07:14:13 Upper Threshold Critical = 100.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Battery 1 23-Supercap Max 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 28.000000 20200414 07:14:13 Upper Threshold Critical = 65.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Power Domain 8 22-VR P2 Mem 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 39.000000 20200414 07:14:13 Upper Threshold Critical = 115.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Power Domain 7 21-VR P2 Mem 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 52.000000 20200414 07:14:13 Upper Threshold Critical = 115.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Power Domain 6 20-VR P1 Mem 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 53.000000 20200414 07:14:13 Upper Threshold Critical = 115.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Power Domain 5 19-VR P1 Mem 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 36.000000 20200414 07:14:13 Upper Threshold Critical = 115.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Power Domain 4 18-VR P2 Zone 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 35.000000 20200414 07:14:13 Upper Threshold Critical = 90.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Power Domain 3 17-VR P1 Zone 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 38.000000 20200414 07:14:13 Upper Threshold Critical = 90.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Power Domain 2 16-VR P2 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 41.000000 20200414 07:14:13 Upper Threshold Critical = 115.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Power Domain 1 15-VR P1 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 46.000000 20200414 07:14:13 Upper Threshold Critical = 115.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Power Supply 5 12-P/S 2 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 38.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Power Supply 4 11-P/S 1 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 38.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Other 2 10-Chipset Zone 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 29.000000 20200414 07:14:13 Upper Threshold Critical = 80.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Other 1 09-Chipset 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 44.000000 20200414 07:14:13 Upper Threshold Critical = 105.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Disk or Disk Bay 1 08-HD Max 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 35.000000 20200414 07:14:13 Upper Threshold Critical = 60.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Memory Device 4 07-P2 DIMM 7-12 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 52.000000 20200414 07:14:13 Upper Threshold Critical = 87.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Memory Device 3 06-P2 DIMM 1-6 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 33.000000 20200414 07:14:13 Upper Threshold Critical = 87.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Memory Device 2 05-P1 DIMM 7-12 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 49.000000 20200414 07:14:13 Upper Threshold Critical = 87.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Memory Device 1 04-P1 DIMM 1-6 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 36.000000 20200414 07:14:13 Upper Threshold Critical = 87.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Other 2 03-CPU 2 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 40.000000 20200414 07:14:13 Upper Threshold Critical = 70.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Other 1 02-CPU 1 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 40.000000 20200414 07:14:13 Upper Threshold Critical = 70.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Other 1 01-Inlet Ambient 20200414 07:14:13 sensorType = 2 - Temperature 20200414 07:14:13 BaseUnits = 2 20200414 07:14:13 Scaled by = 0.010000 20200414 07:14:13 Current Reading = 22.000000 20200414 07:14:13 Upper Threshold Critical = 42.000000 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Check classe CIM_Memory 20200414 07:14:13 Element Name = Proc 1 Level-1 Cache 20200414 07:14:13 Element Op Status = 0 20200414 07:14:13 Element Name = Proc 1 Level-2 Cache 20200414 07:14:13 Element Op Status = 0 20200414 07:14:13 Element Name = Proc 1 Level-3 Cache 20200414 07:14:13 Element Op Status = 0 20200414 07:14:13 Element Name = Proc 2 Level-1 Cache 20200414 07:14:13 Element Op Status = 0 20200414 07:14:13 Element Name = Proc 2 Level-2 Cache 20200414 07:14:13 Element Op Status = 0 20200414 07:14:13 Element Name = Proc 2 Level-3 Cache 20200414 07:14:13 Element Op Status = 0 20200414 07:14:13 Element Name = Memory 20200414 07:14:13 Element Op Status = 7 20200414 07:14:13 Global exit set to CRITICAL 20200414 07:14:13 Check classe CIM_Processor 20200414 07:14:13 Element Name = Proc 1 20200414 07:14:13 Family = 179 20200414 07:14:13 CurrentClockSpeed = 2000MHz 20200414 07:14:13 Element Op Status = 2 20200414 07:14:13 Element Name = Proc 2 20200414 07:14:13 Family = 179 20200414 07:14:13 CurrentClockSpeed = 2000MHz 20200414 07:14:13 Element Op Status = 15 20200414 07:14:13 Check classe CIM_RecordLog 20200414 07:14:14 Element Name = IPMI SEL 20200414 07:14:14 Element Op Status = 2 20200414 07:14:14 Check classe OMC_DiscreteSensor 20200414 07:14:15 Element Name = Disk or Disk Bay 8 C1 P2I Bay 8: Drive Present 20200414 07:14:15 Element Name = Disk or Disk Bay 8 C1 P2I Bay 8: Drive Fault 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 8 C1 P2I Bay 8: Predictive Failure 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 8 C1 P2I Bay 8: Hot Spare 20200414 07:14:15 Element Name = Disk or Disk Bay 8 C1 P2I Bay 8: Parity Check In Progress 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 8 C1 P2I Bay 8: In Critical Array 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 8 C1 P2I Bay 8: In Failed Array 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 8 C1 P2I Bay 8: Rebuild In Progress 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 8 C1 P2I Bay 8: Rebuild Aborted 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 7 C1 P2I Bay 7: Drive Present 20200414 07:14:15 Element Name = Disk or Disk Bay 7 C1 P2I Bay 7: Drive Fault 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 7 C1 P2I Bay 7: Predictive Failure 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 7 C1 P2I Bay 7: Hot Spare 20200414 07:14:15 Element Name = Disk or Disk Bay 7 C1 P2I Bay 7: Parity Check In Progress 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 7 C1 P2I Bay 7: In Critical Array 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 7 C1 P2I Bay 7: In Failed Array 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 7 C1 P2I Bay 7: Rebuild In Progress 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 7 C1 P2I Bay 7: Rebuild Aborted 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 6 C1 P2I Bay 6: Drive Present 20200414 07:14:15 Element Name = Disk or Disk Bay 6 C1 P2I Bay 6: Drive Fault 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 6 C1 P2I Bay 6: Predictive Failure 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 6 C1 P2I Bay 6: Hot Spare 20200414 07:14:15 Element Name = Disk or Disk Bay 6 C1 P2I Bay 6: Parity Check In Progress 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 6 C1 P2I Bay 6: In Critical Array 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 6 C1 P2I Bay 6: In Failed Array 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 6 C1 P2I Bay 6: Rebuild In Progress 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 6 C1 P2I Bay 6: Rebuild Aborted 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 5 C1 P2I Bay 5: Drive Present 20200414 07:14:15 Element Name = Disk or Disk Bay 5 C1 P2I Bay 5: Drive Fault 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 5 C1 P2I Bay 5: Predictive Failure 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 5 C1 P2I Bay 5: Hot Spare 20200414 07:14:15 Element Name = Disk or Disk Bay 5 C1 P2I Bay 5: Parity Check In Progress 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 5 C1 P2I Bay 5: In Critical Array 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 5 C1 P2I Bay 5: In Failed Array 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 5 C1 P2I Bay 5: Rebuild In Progress 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 5 C1 P2I Bay 5: Rebuild Aborted 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 4 C1 P1I Bay 4: Drive Present 20200414 07:14:15 Element Name = Disk or Disk Bay 4 C1 P1I Bay 4: Drive Fault 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 4 C1 P1I Bay 4: Predictive Failure 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 4 C1 P1I Bay 4: Hot Spare 20200414 07:14:15 Element Name = Disk or Disk Bay 4 C1 P1I Bay 4: Parity Check In Progress 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 4 C1 P1I Bay 4: In Critical Array 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 4 C1 P1I Bay 4: In Failed Array 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 4 C1 P1I Bay 4: Rebuild In Progress 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 4 C1 P1I Bay 4: Rebuild Aborted 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 3 C1 P1I Bay 3: Drive Present 20200414 07:14:15 Element Name = Disk or Disk Bay 3 C1 P1I Bay 3: Drive Fault 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 3 C1 P1I Bay 3: Predictive Failure 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 3 C1 P1I Bay 3: Hot Spare 20200414 07:14:15 Element Name = Disk or Disk Bay 3 C1 P1I Bay 3: Parity Check In Progress 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 3 C1 P1I Bay 3: In Critical Array 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 3 C1 P1I Bay 3: In Failed Array 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 3 C1 P1I Bay 3: Rebuild In Progress 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 3 C1 P1I Bay 3: Rebuild Aborted 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 2 C1 P1I Bay 2: Drive Present 20200414 07:14:15 Element Name = Disk or Disk Bay 2 C1 P1I Bay 2: Drive Fault 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 2 C1 P1I Bay 2: Predictive Failure 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 2 C1 P1I Bay 2: Hot Spare 20200414 07:14:15 Element Name = Disk or Disk Bay 2 C1 P1I Bay 2: Parity Check In Progress 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 2 C1 P1I Bay 2: In Critical Array 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 2 C1 P1I Bay 2: In Failed Array 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 2 C1 P1I Bay 2: Rebuild In Progress 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 2 C1 P1I Bay 2: Rebuild Aborted 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 1 C1 P1I Bay 1: Drive Present 20200414 07:14:15 Element Name = Disk or Disk Bay 1 C1 P1I Bay 1: Drive Fault 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 1 C1 P1I Bay 1: Predictive Failure 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 1 C1 P1I Bay 1: Hot Spare 20200414 07:14:15 Element Name = Disk or Disk Bay 1 C1 P1I Bay 1: Parity Check In Progress 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 1 C1 P1I Bay 1: In Critical Array 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 1 C1 P1I Bay 1: In Failed Array 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 1 C1 P1I Bay 1: Rebuild In Progress 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Disk or Disk Bay 1 C1 P1I Bay 1: Rebuild Aborted 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = System Board 6 Memory: Uncorrectable ECC 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = System Board 6 Memory: Correctable ECC logging limit reached 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = System Board 6 Memory: Presence Detected 20200414 07:14:15 Element Name = Power Supply 3 Power Supplies 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = System Chassis 1 UID Light 20200414 07:14:15 Check classe OMC_Fan 20200414 07:14:15 Element Name = Fan 4 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Fan 3 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Fan 2 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Fan 1 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Check classe OMC_PowerSupply 20200414 07:14:15 Element Name = Power Supply 1 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Power Supply 2 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Power Supply 4 20200414 07:14:15 Element Op Status = 0 20200414 07:14:15 Element Name = Power Supply 5 20200414 07:14:15 Element Op Status = 0 20200414 07:14:15 Element Name = Power Supply 6 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Element Name = Power Supply 7 20200414 07:14:15 Element Op Status = 2 20200414 07:14:15 Check classe VMware_StorageExtent 20200414 07:14:16 Element Name = Disk 1 on HPSA1 : Port 1I Box 1 Bay 1 : 558GB : Data Disk 20200414 07:14:16 Element Name = Disk 2 on HPSA1 : Port 1I Box 1 Bay 2 : 558GB : Data Disk 20200414 07:14:16 Element Name = Disk 3 on HPSA1 : Port 1I Box 1 Bay 3 : 558GB : Data Disk 20200414 07:14:16 Element Name = Disk 4 on HPSA1 : Port 1I Box 1 Bay 4 : 558GB : Data Disk 20200414 07:14:16 Element Name = Disk 5 on HPSA1 : Port 2I Box 1 Bay 5 : 558GB : Data Disk 20200414 07:14:16 Element Name = Disk 6 on HPSA1 : Port 2I Box 1 Bay 6 : 558GB : Data Disk 20200414 07:14:16 Element Name = Disk 7 on HPSA1 : Port 2I Box 1 Bay 7 : 558GB : Data Disk 20200414 07:14:16 Element Name = Disk 8 on HPSA1 : Port 2I Box 1 Bay 8 : 558GB : Data Disk 20200414 07:14:16 Check classe VMware_Controller 20200414 07:14:16 Element Name = HP Smart Array P420i Controller : Embedded : HPSA1 20200414 07:14:16 Check classe VMware_StorageVolume 20200414 07:14:16 Element Name = Logical Volume 1 on HPSA1 : RAID 1 + 0 : 2235GB : Disk 1,2,3,4,5,6,7,8 20200414 07:14:16 Check classe VMware_Battery 20200414 07:14:17 Element Name = Battery on HPSA1 20200414 07:14:17 Check classe VMware_SASSATAPort CRITICAL : Memory - Server: HP ProLiant ML350p Gen8 s/n: XXXXXXXXXXXXXX System BIOS: P72 2015-07-01

was working fine with esxi 7.0 but not with 7.0.2 anymore

Traceback (most recent call last):
File "/usr/lib/nagios/plugins/check_esxi_hardware.py", line 785, in except pywbem._exceptions.ConnectionError as args: AttributeError: 'module' object has no attribute '_exceptions'

any ideas how to fix it?

pywbem 1.0 and later no longer support "no_verification" in WBEMConnection

If your monitoring host doesn't have the monitored host's ssl key installed, and you're using pywbem later than 0.17.6, the connection will fail.

"no_verification" no longer has any effect when used as a parameter to WBEMConnection.

pywbem now uses the "requests" module and doesn't set "verify=False" in its call to requests.

Workaround for the moment is to use pywbem 0.17.6 or earlier.

pip install pywbem==0.17.6

Connection failures are not properly detected

Hi,
Because of this try-except statement,
when there is an issue during the initial connection, the code tries to call pywbem with different arguments and we end up with a non-meaningful exception:

TypeError: __init__() got an unexpected keyword argument 'no_verification'

I've never been able to test one of these patched pywbem versions but maybe:

  • you could just catch SSL connection errors and have another except statement for other connection errors?
  • you could look for the keyword in pywbem.WBEMConnection.__init__.__code__.co_varnames or using inspect?

error inconsistent with command line requirements

This is a minor problem, but could improve your tool:

On line 584 and following, you have this code:
# Making sure all mandatory options appeared.
mandatories = ['host', 'user', 'password']
for m in mandatories:
if not options.__dict__[m]:
print("mandatory parameter '--" + m + "' is missing\n")
parser.print_help()
sys.exit(-1)

Therefore, if you forget the password option, the error reads:
mandatory parameter '--password' is missing
But that error is misleading, as the long option name is pass, not password. Thus, if you follow the error message, you will end up with this:
error: no such option: --password

Obviously, when people read then the complete help, they will figure out that it must be --pass.

Xavier

Connection error after ESXi upgrade

Dear community

After upgrading my ESXi hosts from 6.7.0, 17700523 to 7.0.3, 18644231 the check_esxi_hardware script doesn't work anymore. CLI output is:

20211027 15:21:47 LCD Status: True
20211027 15:21:47 Chassis Intrusion Status: True
20211027 15:21:47 Connection to https://xxx.xxx.xx
20211027 15:21:47 Found pywbem version 0.7.0
20211027 15:21:47 Connection error, disable SSL certificate verification (probably patched pywbem)
20211027 15:21:47 Check classe OMC_SMASHFirmwareIdentity
Traceback (most recent call last):
File "./check_esxi_hardware.py", line 790, in
except pywbem._exceptions.ConnectionError as args:
AttributeError: 'module' object has no attribute '_exceptions'

I've tried updating pywbem as well. Since then CLI output has changed but still no success:

20211027 15:27:35 LCD Status: True
20211027 15:27:35 Chassis Intrusion Status: True
20211027 15:27:35 Connection to https://xxx.xxx.xx
20211027 15:27:35 Found pywbem version 1.2.0
20211027 15:27:35 Check classe OMC_SMASHFirmwareIdentity
Traceback (most recent call last):
File "./check_esxi_hardware.py", line 780, in
instance_list = wbemclient.EnumerateInstances(classe)
File "/usr/local/lib/python3.6/site-packages/pywbem/_cim_operations.py", line 2783, in EnumerateInstances
PropertyList=PropertyList)
File "/usr/local/lib/python3.6/site-packages/pywbem/_cim_operations.py", line 1824, in _imethodcall
self, request_data, cimxml_headers)
File "/usr/local/lib/python3.6/site-packages/pywbem/_cim_http.py", line 389, in wbem_request
raise AuthError(msg, conn_id=conn.conn_id)
pywbem._exceptions.AuthError: WBEM server returned HTTP status 401 (Unauthorized). This is most likely an issue with userid/password, but for servers that implement resource access control it might also be an issue with the permissions of the userid.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "./check_esxi_hardware.py", line 781, in
except pywbem.cim_operations.CIMError as args:
AttributeError: module 'pywbem' has no attribute 'cim_operations'

I've one ESXi node left running on 6.7. For this node the script still works like a charm. Any ideas what could do the trick?

OS: CentOS7
pywbem: 0.7.0 / 1.2.0
Version of check_esxi_hardware.py: 20210809
Executed command: check_esxi_hardware.py -H HOSTNAME -U USERNAME -P PASSWORD -V dell -v

Any help appreciated. Thanks in advance.
Sebastian

Problems with LSI CIMs and ESXi 6.7?

Hi Claudio,
this is not an issue with the plugin. But as you have/had many contact with VMware, maybe you know this problem too (and maybe know a solution too?). As you know, I use your plugin to check our ESX hw. Especially the status of the RAID is very interesting for us. We are using LSI/Megaraid RAID Controller and in the past, after installing the CIMs on the ESXi server, we got the RAID status both in VMware and your plugin. Now, with ESXi 6.7 it seems, that the CIMs are not working anymore.
We tried CIMs of https://docs.broadcom.com/docs/VMW-ESX-6.5.0-lsiprovider-500.04.V0.71-0004-9942010.zip
and http://www.58support.nec.co.jp/global/download/042581-G02/VMW-ESX-6.0.0-lsiprovider-500.04.V0.69-0004-offline_bundle-8676001.zip according to the forum thread at https://communities.vmware.com/thread/587140?start=15&tstart=0.
Have you already stumbled upon this problem?

Cheers,
Marcus

Nagios Graph problems with "____" in the end of String

I get in Nagios Graph errors at a new Supermicro Mainboard with ESXI 6.5
The error is:
No data available: host=xxxx service=ESXI Check db=P4Tem_4_Other_4_HDD_
No data available: host=xxxx service=ESXI Check db=P4Tem_4_Other_4_AOC_SAS_

in the shell this infos i get:

P4Tem_3_Other_4_AOC_SAS_Temp___=49;100;105 P4Tem_4_Other_4_HDD_Temp_______=32;50;55

how can i fix it?

pkg_resources is deprecated

Before actually creating a new issue
I confirm, I have read the FAQ (https://www.claudiokuenzler.com/blog/308/check-esxi-hardware-faq-frequently-asked-questions): Y
I confirm, I have restarted the CIM server (/etc/init.d/sfcbd-watchdog restart) on the ESXi server and the problem remains: Y
I confirm, I have cleared the server's local IPMI cache (localcli hardware ipmi sel clear) and restarted the services (/sbin/services.sh restart) on the ESXi server and the problem remains: Y

Describe the bug
The script uses the following code to check the version of pywbem:

# pywbem 0.7.0 handling is special, some patched 0.7.0 installations work differently
try:
  pywbemversion = pywbem.__version__
except:
  pywbemversion = pkg_resources.get_distribution("pywbem").version
else:
  pywbemversion = pywbem.__version__
verboseoutput("Found pywbem version "+pywbemversion)

A deprecation warning appears:
DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html

Expected behavior
Output should not contain the deprecation warning.

Versions:

  • check_esxi_hardware plugin: 20221230
  • VMware ESXi: 7.0u1
  • pywbem: 1.6.2
  • Python: 3.10.12
  • Third party tools (Dell OMSA, HP Offline Bundle, etc): none

Failing disk not detected

Hello,

We are facing a situation where a disk error is not reported by the script.

[root@monitorsrv1 plugins]# ./check_esxi_hardware.py -H ESX1 -U xxxxxx -P xxxxxx -v -t 60
[...]
20190321 09:46:28 Check classe CIM_Chassis
20190321 09:46:28   Element Name = Chassis
20190321 09:46:28     Manufacturer = HP
20190321 09:46:28     SerialNumber = XXXXXXXXX
20190321 09:46:28     Model = ProLiant DL580 G7
20190321 09:46:28     Element Op Status = 0
[...]
20190321 09:46:33 Check classe VMware_StorageExtent
20190321 09:46:34   Element Name = Disk 1 on HPSA1 : Port 1I Box 1 Bay 1 : 279GB : Data Disk : OK
20190321 09:46:34   Element Name = Disk 2 on HPSA1 : Port 1I Box 1 Bay 2 : 279GB : Data Disk : Disk Error
20190321 09:46:34 Check classe VMware_Controller
20190321 09:46:34   Element Name = Smart Array P410i Controller : Embedded : HPSA1
20190321 09:46:34 Check classe VMware_StorageVolume
20190321 09:46:34   Element Name = Logical Volume 1 on HPSA1 : RAID 1 : 279GB : Disk 1,2 : Interim Recovery
[...]
OK - Server: HP ProLiant DL580 G7 s/n: XXXXXXXXX System BIOS: P65 2015-08-16

As you can see, the Disk 2 is in "Error" state in the VMware_StorageExtent classe.
Also, in Logical Volume 1, the status is not Ok.

We replaced the disk:

[root@monitorsrv1 plugins]# ./check_esxi_hardware.py -H ESX1 -U xxxxxxxxxx -P xxxxxxxxxxx -v -t 60
[...]
20190321 10:14:24 Check classe VMware_StorageExtent
20190321 10:14:24   Element Name = Disk 1 on HPSA1 : Port 1I Box 1 Bay 1 : 279GB : Data Disk : OK
20190321 10:14:24   Element Name = Disk 2 on HPSA1 : Port 1I Box 1 Bay 2 : 279GB : Data Disk : Rebuilding
20190321 10:14:24 Check classe VMware_Controller
20190321 10:14:25   Element Name = Smart Array P410i Controller : Embedded : HPSA1
20190321 10:14:25 Check classe VMware_StorageVolume
20190321 10:14:25   Element Name = Logical Volume 1 on HPSA1 : RAID 1 : 279GB : Disk 1,2 : Currently Recovering
[...]
OK - Server: HP ProLiant DL580 G7 s/n: XXXXXXXXXXX System BIOS: P65 2015-08-16

And after some minutes, it is back to ok:

[root@monitorsrv1 plugins]# ./check_esxi_hardware.py -H ESX1 -U xxxxxxxxx -P xxxxxxxxxxxx -v -t 60
[...]
20190321 10:19:54 Check classe VMware_StorageExtent
20190321 10:19:55   Element Name = Disk 1 on HPSA1 : Port 1I Box 1 Bay 1 : 279GB : Data Disk : OK
20190321 10:19:55   Element Name = Disk 2 on HPSA1 : Port 1I Box 1 Bay 2 : 279GB : Data Disk : OK
20190321 10:19:55 Check classe VMware_Controller
20190321 10:19:55   Element Name = Smart Array P410i Controller : Embedded : HPSA1
20190321 10:19:55 Check classe VMware_StorageVolume
20190321 10:19:55   Element Name = Logical Volume 1 on HPSA1 : RAID 1 : 279GB : Disk 1,2 : Ok
[...]
OK - Server: HP ProLiant DL580 G7 s/n: XXXXXXXXXX System BIOS: P65 2015-08-16

I would expect to have at least for the VMware_StorageExtent elements:

  • a critical alarm when the status is "Disk Error"
  • a warning alarm when the status is "Rebuilding"
    And maybe an alarm related to the status of the VMware_StorageVolume elements:
  • warning for "Interim Recovery" or "Currently Recovering"

Please note that I've checked on anther esx of the same model (ProLiant DL580 G7) and I can see that the status are not shown.
I don't know the reason in fact.
In such a case, I don't know if an alarm should be raised. But at least is the status is written and bad, it shoudl trigger an alarm.

20190321 09:52:47 Check classe VMware_StorageExtent
20190321 09:52:48   Element Name = Disk 1 on HPSA1 : Port 1I Box 1 Bay 1 : 279GB : Data Disk
20190321 09:52:48   Element Name = Disk 2 on HPSA1 : Port 1I Box 1 Bay 2 : 279GB : Data Disk
20190321 09:52:48 Check classe VMware_Controller
20190321 09:52:48   Element Name = HP      Smart Array P410i Controller : Embedded : HPSA1
20190321 09:52:48 Check classe VMware_StorageVolume
20190321 09:52:48   Element Name = Logical Volume 1 on HPSA1 : RAID 1 : 279GB : Disk 1,2

BR,
Yannick

UNKNOWN: Authentication Error for a new user

Hello

I have retested this several times and even gave it the same permissions as root and I get the same error.

I made a new user, currently with the Administrator role, and every time I run the script with that ESXi user I get a UNKNOWN: Authentication Error for said user.

I can logon to the web console using that user and do whatever operation I want.

Why?

HP Vendor Issues with Network Class check

Hi,

just as info

i added 'VMware_EthernetPort', to the CIM Classes to check because it's very helpfully to get alerts once an Network Port getting issues.

ProLiant DL360 G7

the check with -V hp -i vmnic2,vmnic3 > seems this check doesn't work

i had to use -V unknown -i vmnic2,vmnic3 then i got alerts fro everything which is not vmnic2/vminc3

thx

Max

Make plugin compatible with python3

On Ubuntu 14.04 LTS with python 3.4 the following error is thrown:

  File "./check_esxi_hardware.py3", line 440
    print "%s %s" % (time.strftime("%Y%m%d %H:%M:%S"), message)
            ^
SyntaxError: invalid syntax

clean up /tmp/<ip>_openssl.conf

This issue may be linked to the recent fix of issue #45

The script does not clean up its tmp file related to openssl, not even when the run ends OK.

This seems a detail, but it can cause problems. If systems people test your code, they may be using root to ensure that the call works with root access. If that works, they will try to run it with a normal user like nagios. But if you do that, then the tmp file is still there, and the normal user cannot overwrite the tmp file as it was created by root to begin with.

And it obviously is always a good practice to clean up tmp files.

Thanks!

False critical on HP ProLiant 380p Gen8 with ESXi 6.5u1

Since some time after we upgraded our fleet to ESXi 6.5u1 the check returns the critical status for disk or disk bay of all installed drives (2 SAS HDDs) for two of our hosts.

./check_esxi_hardware-20161013.py -H hostX.fqdn -U user -P password
 CRITICAL : Disk or Disk Bay 2 C1 P1I Bay 2: In Failed Array  CRITICAL : Disk or Disk Bay 1 C1 P1I Bay 1: In Failed Array - Server: HP ProLiant DL380p Gen8 s/n: XXXXXXXXXXX System BIOS: P70 2015-07-01

At the same time it returns all good for a dozen other hosts with identical or similar hardware configuration:

./check_esxi_hardware-20161013.py -H hostY.fqdn -U user -P password
 OK - Server: HP ProLiant DL380p Gen8 s/n: XXXXXXXXXXYY System BIOS: P70 2015-07-01

Several things confuse me:

  1. The critical status was not triggered immediately after the firmware and ESXi upgrades, but only after a later reboot.
  2. The check returns all good for a dozen other hosts of which most have the same or very similar configuration.
  3. Firmware versions at first glance don't seem to be the culprit, as both hosts with critical checks have slightly different firmware versions (controller and disks) and the same versions are found on other hosts that do not result in critical checks.

Is there further information I can provide to help get to the root of this?

Best regards

ImportError: No module named pywbem | Ubuntu 20.04.03

Before actually creating a new issue
I confirm, I have read the FAQ (https://www.claudiokuenzler.com/blog/308/check-esxi-hardware-faq-frequently-asked-questions): Y

Describe the bug
Same problem as bug report 53 (#53), script can't seem to find pywbem module. Using Ubuntu 20.04.03.

root@myserver:~# /usr/lib/nagios/plugins/check_esxi_hardware.py -H myserver -U root -P mypwd --no-intrusion
Traceback (most recent call last):
  File "/usr/lib/nagios/plugins/check_esxi_hardware.py", line 292, in <module>
    import pywbem
ImportError: No module named pywbem

Versions:

  • check_esxi_hardware plugin: 20210809
  • pywbem: 1.4.1
 root@myserver:~# pip list pywbem | grep pywbem
pywbem                 1.4.1
  • Python: 2.7.18 and 3.8.10
root@myserver:~# python -V
Python 2.7.18
root@myserver:~# python3 -V
Python 3.8.10

Additional context
I've tried installing sblim-wbemcli but it doesn't seem to work. I've also logged out and even restarted the server.

root@myserver:~# apt install python-pywbem
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-pywbem is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  sblim-wbemcli

E: Package 'python-pywbem' has no installation candidate
root@myserver:~# apt install sblim-wbemcli
Reading package lists... Done
Building dependency tree
Reading state information... Done
sblim-wbemcli is already the newest version (1.6.3-2build1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@myserver:~#
root@myserver:~# /usr/lib/nagios/plugins/check_esxi_hardware.py -H myserver -U root -P mypwd --no-intrusion
Traceback (most recent call last):
  File "/usr/lib/nagios/plugins/check_esxi_hardware.py", line 292, in <module>
    import pywbem
ImportError: No module named pywbem

I've run pip install aswell

root@myserver:~# pip install pywbem
Requirement already satisfied: pywbem in /usr/local/lib/python3.8/dist-packages (1.4.1)
Requirement already satisfied: requests>=2.22.0 in /usr/lib/python3/dist-packages (from pywbem) (2.22.0)
Requirement already satisfied: ply>=3.10 in /usr/local/lib/python3.8/dist-packages (from pywbem) (3.11)
Requirement already satisfied: urllib3>=1.25.9 in /usr/local/lib/python3.8/dist-packages (from pywbem) (1.26.8)
Requirement already satisfied: yamlloader>=0.5.5 in /usr/local/lib/python3.8/dist-packages (from pywbem) (1.1.0)
Requirement already satisfied: nocaselist>=1.0.3 in /usr/local/lib/python3.8/dist-packages (from pywbem) (1.0.4)
Requirement already satisfied: nocasedict>=1.0.1 in /usr/local/lib/python3.8/dist-packages (from pywbem) (1.0.2)
Requirement already satisfied: six>=1.14.0 in /usr/lib/python3/dist-packages (from pywbem) (1.14.0)
Requirement already satisfied: PyYAML>=5.3.1 in /usr/lib/python3/dist-packages (from pywbem) (5.3.1)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@myserver:~#

The files seems to be there

root@myserver:~# ls -l /usr/local/lib/python3.8/dist-packages
total 60
drwxr-sr-x 3 root staff 4096 Feb  4 13:29 nocasedict
drwxr-sr-x 2 root staff 4096 Feb  4 13:29 nocasedict-1.0.2.dist-info
drwxr-sr-x 3 root staff 4096 Feb  4 13:29 nocaselist
drwxr-sr-x 2 root staff 4096 Feb  4 13:29 nocaselist-1.0.4.dist-info
drwxr-sr-x 5 root staff 4096 Feb  4 13:47 pip
drwxr-sr-x 2 root staff 4096 Feb  4 13:47 pip-22.0.3.dist-info
drwxr-sr-x 3 root staff 4096 Feb  4 13:29 ply
drwxr-sr-x 2 root staff 4096 Feb  4 13:29 ply-3.11.dist-info
drwxr-sr-x 3 root staff 4096 Feb  4 13:29 pywbem
drwxr-sr-x 2 root staff 4096 Feb  4 13:29 pywbem-1.4.1.dist-info
drwxr-sr-x 3 root staff 4096 Feb  4 13:29 pywbem_mock
drwxr-sr-x 6 root staff 4096 Feb  4 13:29 urllib3
drwxr-sr-x 2 root staff 4096 Feb  4 13:29 urllib3-1.26.8.dist-info
drwxr-sr-x 4 root staff 4096 Feb  4 13:29 yamlloader
drwxr-sr-x 2 root staff 4096 Feb  4 13:29 yamlloader-1.1.0.dist-info
root@myserver:~# ls -l /usr/local/lib/python3.8/dist-packages/pywbem
total 1588
-rw-r--r-- 1 root staff  10821 Feb  4 13:29 _cim_constants.py
-rw-r--r-- 1 root staff  17511 Feb  4 13:29 _cim_http.py
-rw-r--r-- 1 root staff 307002 Feb  4 13:29 _cim_obj.py
-rw-r--r-- 1 root staff 444445 Feb  4 13:29 _cim_operations.py
-rw-r--r-- 1 root staff  50789 Feb  4 13:29 _cim_types.py
-rw-r--r-- 1 root staff  56118 Feb  4 13:29 _cim_xml.py
-rw-r--r-- 1 root staff   1971 Feb  4 13:29 _cliutils.py
-rw-r--r-- 1 root staff   5176 Feb  4 13:29 config.py
-rw-r--r-- 1 root staff  25884 Feb  4 13:29 _exceptions.py
-rw-r--r-- 1 root staff   1685 Feb  4 13:29 _features.py
-rw-r--r-- 1 root staff   3655 Feb  4 13:29 __init__.py
-rw-r--r-- 1 root staff  45720 Feb  4 13:29 _listener.py
-rw-r--r-- 1 root staff  21549 Feb  4 13:29 _logging.py
-rw-r--r-- 1 root staff 114278 Feb  4 13:29 _mof_compiler.py
-rw-r--r-- 1 root staff   2648 Feb  4 13:29 _moflextab.py
-rw-r--r-- 1 root staff  70070 Feb  4 13:29 _mofparsetab.py
-rw-r--r-- 1 root staff   3522 Feb  4 13:29 _nocasedict.py
drwxr-sr-x 2 root staff   4096 Feb  4 13:29 __pycache__
-rw-r--r-- 1 root staff  44071 Feb  4 13:29 _recorder.py
-rw-r--r-- 1 root staff  55039 Feb  4 13:29 _server.py
-rw-r--r-- 1 root staff  29709 Feb  4 13:29 _statistics.py
-rw-r--r-- 1 root staff  63685 Feb  4 13:29 _subscription_manager.py
-rw-r--r-- 1 root staff  91426 Feb  4 13:29 _tupleparse.py
-rw-r--r-- 1 root staff  20208 Feb  4 13:29 _tupletree.py
-rw-r--r-- 1 root staff  25979 Feb  4 13:29 _units.py
-rw-r--r-- 1 root staff  13309 Feb  4 13:29 _utils.py
-rw-r--r-- 1 root staff  32939 Feb  4 13:29 _valuemapping.py
-rw-r--r-- 1 root staff   1192 Feb  4 13:29 _version.py
-rw-r--r-- 1 root staff   2694 Feb  4 13:29 _warnings.py
root@myserver:~#

I don't think I have any virtual enviroments.

Any tips appreciated :)

Is there any way to check HealthState or Status of NIC(vmnic)?

Before actually creating a new issue
I confirm, I have read the FAQ (https://www.claudiokuenzler.com/blog/308/check-esxi-hardware-faq-frequently-asked-questions): Y
I confirm, I have restarted the CIM server (/etc/init.d/sfcbd-watchdog restart) on the ESXi server and the problem remains: Y
I confirm, I have cleared the server's local IPMI cache (localcli hardware ipmi sel clear) and restarted the services (/sbin/services.sh restart) on the ESXi server and the problem remains: Y

Describe the bug
I added some scripts to check_esxi_hardware.py to handle the VMWare_EthernetPort and VMWare_PCIDevice classes to get NIC status.
However, the CIM server didn't give me any information about the NIC status.

VMWare_Ethernetport : HealthState, OperationalStatus, Status... are always NULL.
VMWare_PCIDevice : HealthState is not NULL, but always 0(Unknown). Other properties are always NULL.

Is HealthState still just a property that exists in the VMWare_Ethernetport/VMWare_PCIDevice schemas, not implemented?

Show the full plugin output, including the command with -v parameter

$ enum_instances VMware_EthernetPort root/cimv2

VMware_EthernetPort.CreationClassName="VMware_EthernetPort",DeviceID="vmnic0",SystemCreationClassName="OMC_UnitaryComputerSystem",SystemName="MY_SYSTEM_NAME"...
                    SystemName = MY_SYSTEM_NAME
       SystemCreationClassName = OMC_UnitaryComputerSystem
                      DeviceID = vmnic0
             CreationClassName = VMware_EthernetPort
                    WOLOptions = { 6,  }
                  WOLSupported = { 6,  }
                   Transceiver = 1
               PhysicalAddress = 0
     AdvertisedAutoNegotiation = true
           AdvertisedLinkModes = { AUTO_AUTO, 1000_FULL, 100_HALF, 100_FULL, 10_HALF, 10_FULL,  }
            SupportedLinkModes = { AUTO_AUTO, 1000_FULL, 100_HALF, 100_FULL, 10_HALF, 10_FULL,  }
                SupportedPorts = { 1,  }
                     AutoSense = 1
                      PortType = 53
       IdentifyingDescriptions = { PCI Bus, PCI Slot, PCI Function, PCI Vendor, PCI DeviceID, PCI Segment,  }
          OtherIdentifyingInfo = { 0x03, 0x00, 0x00, 0x14e4, 0x1657, 0x0000,  }
 ActiveMaximumTransmissionUnit = 1500
                    FullDuplex = true
              UsageRestriction = 4
          TransitioningToState = 12
                         Speed = 1000000000
                RequestedState = 5
              PermanentAddress = MY_ADDRESS_VALUE
             OperationalStatus = { 2,  }
              NetworkAddresses = { MY_ADDRESS_VALUE,  }
                          Name = vmnic0
                LinkTechnology = 2
                  EnabledState = 2
                EnabledDefault = 2
           EnabledCapabilities = { 5,  }
                   ElementName = vmnic0
                       Caption = vmnic0
                  Capabilities = { 5,  }
SupportedMaximumTransmissionUnit = (NULL)
           OtherLinkTechnology = (NULL)
                    PortNumber = (NULL)
          OtherNetworkPortType = (NULL)
                MaxQuiesceTime = (NULL)
        AdditionalAvailability = (NULL)
             TotalPowerOnHours = (NULL)
                  PowerOnHours = (NULL)
                  ErrorCleared = (NULL)
              ErrorDescription = (NULL)
                 LastErrorCode = (NULL)
                    StatusInfo = (NULL)
                  Availability = (NULL)
   PowerManagementCapabilities = (NULL)
      PowerManagementSupported = (NULL)
                   Description = (NULL)
                    InstanceID = (NULL)
                   InstallDate = (NULL)
            StatusDescriptions = (NULL)
                        Status = (NULL)
                   HealthState = (NULL)
           CommunicationStatus = (NULL)
                DetailedStatus = (NULL)
               OperatingStatus = (NULL)
                 PrimaryStatus = (NULL)
             OtherEnabledState = (NULL)
         TimeOfLastStateChange = (NULL)
      AvailableRequestedStates = (NULL)
                      MaxSpeed = (NULL)
                RequestedSpeed = (NULL)
                 OtherPortType = (NULL)
                   MaxDataSize = (NULL)
        CapabilityDescriptions = (NULL)
      OtherEnabledCapabilities = (NULL)
$ enum_instances VMWare_PCIDevice root/cimv2

VMware_PCIDevice.SystemCreationClassName="OMC_UnitaryComputerSystem",SystemName="MY_SYSTEM_NAME...
                      DeviceID = PCI 0:3:0:0
             CreationClassName = VMware_PCIDevice
                    SystemName = MY_SYSTEM_NAME
       SystemCreationClassName = OMC_UnitaryComputerSystem
                  PhysicalSlot = (NULL)
                ParentDeviceID = PCI 0:0:2:2
                 SegmentNumber = 0
                  SubClassCode = 0
                    RevisionID = 1
                      VendorID = 5348
                   PCIDeviceID = 5719
                FunctionNumber = 0
                  DeviceNumber = 0
                     BusNumber = 3
             SubsystemVendorID = 4156
                   SubsystemID = 5789
                     ClassCode = 2
                  Capabilities = { 1, 3, 5, 17, 16,  }
                RequestedState = 0
                  EnabledState = 0
                 PrimaryStatus = 0
                   HealthState = 0
                   ElementName = Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet #0
               SelfTestEnabled = (NULL)
       ExpansionROMBaseAddress = (NULL)
                  InterruptPin = (NULL)
                  LatencyTimer = (NULL)
                 CacheLineSize = (NULL)
            DeviceSelectTiming = (NULL)
        CapabilityDescriptions = (NULL)
               CommandRegister = (NULL)
                MaxQuiesceTime = (NULL)
        AdditionalAvailability = (NULL)
       IdentifyingDescriptions = (NULL)
             TotalPowerOnHours = (NULL)
                  PowerOnHours = (NULL)
          OtherIdentifyingInfo = (NULL)
                  ErrorCleared = (NULL)
              ErrorDescription = (NULL)
                 LastErrorCode = (NULL)
                    StatusInfo = (NULL)
                  Availability = (NULL)
   PowerManagementCapabilities = (NULL)
      PowerManagementSupported = (NULL)
                   Description = (NULL)
                       Caption = (NULL)
                    InstanceID = (NULL)
                   InstallDate = (NULL)
                          Name = (NULL)
             OperationalStatus = (NULL)
            StatusDescriptions = (NULL)
                        Status = (NULL)
           CommunicationStatus = (NULL)
                DetailedStatus = (NULL)
               OperatingStatus = (NULL)
             OtherEnabledState = (NULL)
                EnabledDefault = 2
         TimeOfLastStateChange = (NULL)
      AvailableRequestedStates = (NULL)
          TransitioningToState = 12
               TimeOfLastReset = (NULL)
             ProtocolSupported = (NULL)
           MaxNumberControlled = (NULL)
           ProtocolDescription = (NULL)
                   BaseAddress = (NULL)
                  MinGrantTime = (NULL)
                    MaxLatency = (NULL)

Expected behavior
HealthState should be 5.

Versions:

  • check_esxi_hardware plugin: 20221230
  • VMware ESXi: 7.0.3
  • pywbem: 1.6.1
  • Python: 3.8.10
  • Third party tools (Dell OMSA, HP Offline Bundle, etc):

Additional context
Add any other context about the problem here.

Socket error: [Errno 104] Connection reset by peer

Hi all

Thank you for your work!
Our ESXi 6.7 works fine. But after some time we became this error

UNKNOWN: (0, 'Socket error: [Errno 104] Connection reset by peer')

Any ideas whats going wrong?

Thank you for your help

check_esxi_hardware.py fails after ESXI upgrade

Hi Claudio Kuenzler,

We have upgrade the ESXI from 6.7 to 7.0.3 19482537. The plugin stopped working and returns an "UnAuthorized" error, Kindly advise.

Python Version : 3.8
Pywbem Version : 0.12.0

[~@node01]# /usr/local/nagios/libexec/check_esxi_hardware.py -H "172.16.10.11" -U file:/usr/local/nagios/etc/.esxiauth1 -P file:/usr/local/nagios/etc/.esxiauth1 -V dell --perfdata
Traceback (most recent call last):
File "/usr/local/nagios/libexec/check_esxi_hardware.py", line 780, in
instance_list = wbemclient.EnumerateInstances(classe)
File "/usr/local/lib/python3.8/site-packages/pywbem/_cim_operations.py", line 3052, in EnumerateInstances
result = self._imethodcall(
File "/usr/local/lib/python3.8/site-packages/pywbem/_cim_operations.py", line 1949, in _imethodcall
reply_data, self._last_server_response_time = wbem_request(
File "/usr/local/lib/python3.8/site-packages/pywbem/_cim_http.py", line 568, in wbem_request
raise AuthError(msg, conn_id=conn.conn_id)
pywbem._exceptions.AuthError: WBEM server returned HTTP status 401 (Unauthorized). This is most likely an issue with userid/password, but for servers that implement resource access control it might also be an issue with the permissions of the userid.

During handling of the above exception, another exception occurred:

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 'pywbem' has no attribute 'cim_operations'

TypeError: can only concatenate str (not "NoneType") to str

Before actually creating a new issue
I confirm, I have read the FAQ (https://www.claudiokuenzler.com/blog/308/check-esxi-hardware-faq-frequently-asked-questions): Y
I confirm, I have restarted the CIM server (/etc/init.d/sfcbd-watchdog restart) on the ESXi server and the problem remains: Y
I confirm, I have cleared the server's local IPMI cache (localcli hardware ipmi sel clear) and restarted the services (/sbin/services.sh restart) on the ESXi server and the problem remains: Y

Describe the bug
While checking the plugin against an ESXi 8, the following error showed up:

$ ./check_esxi_hardware.py -H 192.168.15.115 -U root -P password 
Traceback (most recent call last):
  File "./check_esxi_hardware.py", line 1070, in <module>
    print("OK - Server: %s %s %s%s" % (server_info, 's/n: ' + SerialNumber, bios_info, perf))
TypeError: can only concatenate str (not "NoneType") to str

The reason is that in this particular situation, the ESXi server was installed as a virtual machine and therefore does not offer any hardware related information, including serial numbers. This causes the plugin to fail because it attempts to concatenate a missing (NoneType) object with the string "s/n:".

Show the full plugin output, including the command with -v parameter

$ ./check_esxi_hardware.py -H 192.168.15.115 -U root -P password  -v
20221228 17:00:47 LCD Status: True
20221228 17:00:47 Chassis Intrusion Status: True
20221228 17:00:47 Connection to https://192.168.15.115
20221228 17:00:47 Found pywbem version 1.1.3
20221228 17:00:47 Check classe OMC_SMASHFirmwareIdentity
20221228 17:00:48   Element Name = System BIOS
20221228 17:00:48     VersionString = 1.12.0-1
20221228 17:00:48 Check classe CIM_Chassis
20221228 17:00:48   Element Name = Chassis
20221228 17:00:48     Manufacturer = QEMU
20221228 17:00:48     Model = Standard PC (Q35 + ICH9, 2009)
20221228 17:00:48     Element Op Status = 0
20221228 17:00:48 Check classe CIM_Card
20221228 17:00:48 Check classe CIM_ComputerSystem
20221228 17:00:48   Element Name = localhost
20221228 17:00:48 Check classe CIM_NumericSensor
20221228 17:00:48 Check classe CIM_Memory
20221228 17:00:48   Element Name = Memory
20221228 17:00:48 Check classe CIM_Processor
20221228 17:00:49   Element Name = CPU 0
20221228 17:00:49     Family = 1
20221228 17:00:49     CurrentClockSpeed = 2000MHz
20221228 17:00:49     Element Op Status = 2
20221228 17:00:49   Element Name = CPU 1
20221228 17:00:49     Family = 1
20221228 17:00:49     CurrentClockSpeed = 2000MHz
20221228 17:00:49     Element Op Status = 2
20221228 17:00:49   Element Name = CPU 2
20221228 17:00:49     Family = 1
20221228 17:00:49     CurrentClockSpeed = 2000MHz
20221228 17:00:49     Element Op Status = 2
20221228 17:00:49   Element Name = CPU 3
20221228 17:00:49     Family = 1
20221228 17:00:49     CurrentClockSpeed = 2000MHz
20221228 17:00:49     Element Op Status = 2
20221228 17:00:49 Check classe CIM_RecordLog
20221228 17:00:49 Check classe OMC_DiscreteSensor
20221228 17:00:49 Check classe OMC_Fan
20221228 17:00:49 Check classe OMC_PowerSupply
20221228 17:00:49 Check classe VMware_StorageExtent
20221228 17:00:49 Check classe VMware_Controller
20221228 17:00:49 Check classe VMware_StorageVolume
20221228 17:00:49 Check classe VMware_Battery
20221228 17:00:50 Check classe VMware_SASSATAPort
Traceback (most recent call last):
  File "./check_esxi_hardware.py", line 1070, in <module>
    print("OK - Server: %s %s %s%s" % (server_info, 's/n: ' + SerialNumber, bios_info, perf))
TypeError: can only concatenate str (not "NoneType") to str

Expected behavior
Error should not happen.

Versions:

  • check_esxi_hardware plugin: 20220708
  • VMware ESXi: 8.0.0
  • pywbem: 1.1.3
  • Python: 3.8.10
  • Third party tools (Dell OMSA, HP Offline Bundle, etc): N/A

Additional context
N/A

Run check_esxi_hardware.py with readonly user on esxi not working

Before actually creating a new issue
I confirm, I have read the FAQ (https://www.claudiokuenzler.com/blog/308/check-esxi-hardware-faq-frequently-asked-questions): Y
I confirm, I have restarted the CIM server (/etc/init.d/sfcbd-watchdog restart) on the ESXi server and the problem remains: Y
I confirm, I have cleared the server's local IPMI cache (localcli hardware ipmi sel clear) and restarted the services (/sbin/services.sh restart) on the ESXi server and the problem remains: Y

Describe the bug
If i'm using this script with an ESXi user which has "read only" Role assigned. The script fails to connect.
If i'm using the ESXi root user, it works.

Show the full plugin output, including the command with -V parameter
Run the plugin with -V parameter and show the full output (including command) here. Obviously obfuscate credentials.

[user1@nagioshost ~]$ /usr/local/nagios/libexec/check_esxi_hardware-20210809.py -H vms07.domain.local -U nagiosusr -P XXXXXXXXXXXXXXXX -V hp -i '.*Unconfigured Disk' -r -v
20220425 09:54:53 LCD Status: True
20220425 09:54:53 Chassis Intrusion Status: True
20220425 09:54:53 Connection to https://vms07.domain.local
20220425 09:54:53 Found pywbem version 0.7.0
20220425 09:54:55 Connection error, disable SSL certificate verification (probably patched pywbem)
Traceback (most recent call last):
  File "/usr/local/nagios/libexec/check_esxi_hardware-20210809.py", line 721, in <module>
    wbemclient = pywbem.WBEMConnection(hosturl, (user,password), no_verification=True)
TypeError: __init__() got an unexpected keyword argument 'no_verification'

Expected behavior
A clear and concise description of what you expected to happen.

[user1@nagioshost ~]$ /usr/local/nagios/libexec/check_esxi_hardware-20210809.py -H vms07.domain.local -U root -P XXXXXXXXXXXX -V hp -i '.*Unconfigured Disk' -r -v
20220425 09:41:48 LCD Status: True
20220425 09:41:48 Chassis Intrusion Status: True
20220425 09:41:48 Connection to https://vms07.domain.local
20220425 09:41:48 Found pywbem version 0.7.0
20220425 09:41:48 Connection worked
20220425 09:41:48 Check classe OMC_SMASHFirmwareIdentity
20220425 09:41:48   Element Name = System BIOS
20220425 09:41:48     VersionString = U32
20220425 09:41:48 Check classe CIM_Chassis
20220425 09:41:49   Element Name = Chassis
20220425 09:41:49     Manufacturer = HPE
20220425 09:41:49     SerialNumber = XXXXXXXXXXXX
20220425 09:41:49     Model = ProLiant DL360 Gen10

Versions:

  • check_esxi_hardware plugin: 20210809
  • VMware ESXi: 6.7.0 Update 3 (Build 15160138)
  • pywbem: 0.7.0
  • Python: Python 2.6.6
  • Third party tools (Dell OMSA, HP Offline Bundle, etc): ESXi installed with HP-ISO

Additional context
Add any other context about the problem here.

SSL problems with older ESXi

Hi, Im an end user so apologies if this is only meant for contributors, but I saw there was a previous issue #45 that was addressed, but I am still seeing this issue on Ubuntu 20.04 LTS connecting to ESXi 5.1. I've installed pyhton3 via apt and pywbem via pip. I'm running:

check_esxi_hardware.py" --host=192.168.1.17 --user=root --pass=1234566 --sslproto=TLSv1.0 --vendor=ibm

And getting the same error as previously reported

`Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py", line 485, in wrap_socket
cnx.do_handshake()
File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1915, in do_handshake
self._raise_ssl_error(self._ssl, result)
File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1647, in _raise_ssl_error
_raise_current_error()
File "/usr/lib/python3/dist-packages/OpenSSL/_util.py", line 54, in exception_from_error_queue
raise exception_type(errors)
OpenSSL.SSL.Error: [('SSL routines', 'ssl_choose_client_version', 'unsupported protocol')]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 996, in validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 366, in connect
self.sock = ssl_wrap_socket(
File "/usr/lib/python3/dist-packages/urllib3/util/ssl
.py", line 383, in ssl_wrap_socket
return context.wrap_socket(sock)
File "/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py", line 491, in wrap_socket
raise ssl.SSLError("bad handshake: %r" % e)
ssl.SSLError: ("bad handshake: Error([('SSL routines', 'ssl_choose_client_version', 'unsupported protocol')])",)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 747, in urlopen
return self.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 747, in urlopen
return self.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192.168.1.17', port=5989): Max retries exceeded with url: /cimom (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl_choose_client_version', 'unsupported protocol')])")))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/pywbem/_cim_http.py", line 315, in wbem_request
resp = conn.session.post(
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 581, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='192.168.1.17', port=5989): Max retries exceeded with url: /cimom (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl_choose_client_version', 'unsupported protocol')])")))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/nagios/plugins//check_esxi_hardware.py", line 775, in
instance_list = wbemclient.EnumerateInstances(classe)
File "/usr/local/lib/python3.8/dist-packages/pywbem/_cim_operations.py", line 2628, in EnumerateInstances
result = self._imethodcall(
File "/usr/local/lib/python3.8/dist-packages/pywbem/_cim_operations.py", line 1746, in _imethodcall
reply_data, self._last_server_response_time = wbem_request(
File "/usr/local/lib/python3.8/dist-packages/pywbem/_cim_http.py", line 320, in wbem_request
raise ConnectionError(msg, conn_id=conn.conn_id)
pywbem._exceptions.ConnectionError: ("bad handshake: Error([('SSL routines', 'ssl_choose_client_version', 'unsupported protocol')])",); OpenSSL version used: OpenSSL 1.1.1f 31 Mar 2020

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/nagios/plugins//check_esxi_hardware.py", line 776, in
except pywbem.cim_operations.CIMError as args:
AttributeError: module 'pywbem' has no attribute 'cim_operations'`

Possibly I'm doing something wrong? Or is this issue not fixed given my configuration?

TIA, Andy.

Run check_esxi_hardware.py with readonly user on esxi

Before actually creating a new issue
I confirm, I have read the FAQ (https://www.claudiokuenzler.com/blog/308/check-esxi-hardware-faq-frequently-asked-questions): Y/N
I confirm, I have restarted the CIM server (/etc/init.d/sfcbd-watchdog restart) on the ESXi server and the problem remains: Y/N
I confirm, I have cleared the server's local IPMI cache (localcli hardware ipmi sel clear) and restarted the services (/sbin/services.sh restart) on the ESXi server and the problem remains: Y/N

Describe the bug
A clear and concise description of what the bug is.

Show the full plugin output, including the command with -V parameter
Run the plugin with -V parameter and show the full output (including command) here. Obviously obfuscate credentials.

Expected behavior
A clear and concise description of what you expected to happen.

Versions:

  • check_esxi_hardware plugin:
  • VMware ESXi:
  • pywbem:
  • Python:
  • Third party tools (Dell OMSA, HP Offline Bundle, etc):

Additional context
Add any other context about the problem here.

I downloaded latest check_esxi_hardware.py and my os info is :
Red Hat Enterprise Linux Server release 6.4 (Santiago)
python-pywbem-0.7.1-5.1.x86_64

also I have create a user with read-only role on my esxi now when run this command on nagios show follow error :

[root@nagios ~]# /usr/local/nagios/libexec/check_esxi_hardware.py -H host1.opr.dsa -U mon -P Mon@123
Traceback (most recent call last):
File "/usr/local/nagios/libexec/check_esxi_hardware.py", line 721, in
wbemclient = pywbem.WBEMConnection(hosturl, (user,password), no_verification=True)
TypeError: init() got an unexpected keyword argument 'no_verification'

But when run with root user it shows output without problem :

[root@nagios ~]# /usr/local/nagios/libexec/check_esxi_hardware.py -H host1.opr.dsa -U root -P password -V 'hp'
OK - Server: HPE ProLiant DL580 Gen10 s/n: CN78390000 System BIOS: U34 2021-05-24

memory check error

Peace, nagios produces an error:

  CRITICAL : Memory - Server: IBM -[985421A2G]- s/n: 1234567 System BIOS: -[Bla189BUS-3.25]- (Date)
while in vsphere: memory used 235382/3933162 which is obviously less than 90%
 

cim_operations error

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'

Compatiblity with patched pywbem

In the previous months, Fedora (tbv), RedHat, Centos and Suse have applied patches to their pywbem packages. One of them is to verify the certificate. As most ESXi systems don't have a "real" ssl certificate, the following error is then shown when the plugin is run:

Unknown CIM Error: (0, 'SSL error: certificate verify failed') 

This error can be solved by adding "no_verification" to the wbem connection string:

wbemclient = pywbem.WBEMConnection(hosturl, (user,password), NS, no_verification=True)

But this won't work for earlier releases and for the upstream version of pywbem.

According to the pywbem-dev mailing list, a new version (0.8.0) is being prepared for release. When this release hits the web, the plugin will be adapted to run with "no_verification parameter" when the pywbem package is newer than 0.7.0. Until then .. sleep.

Plugin hangs at Check classe OMC_PowerSupply (VMware 6.0 U2)

Hi Claudio,
first of all, thanks for this great plugin. We use it to check a lot of Dell esx hosts.
Unfortunately since 2 days we have a problem. We updated the VMware Version to VMware 6.0 U2 and now get a Unknown State because we run in a timeout.
I checked on CLI in verbose mode and notificed that the Plugin always hangs at one specific point:
20161229 23:34:08 Check classe OMC_Fan
20161229 23:34:08 Element Name = FAN 5 RPM
20161229 23:34:08 Element Op Status = 2
20161229 23:34:08 Element Name = FAN 4 RPM
20161229 23:34:08 Element Op Status = 2
20161229 23:34:08 Element Name = FAN 3 RPM
20161229 23:34:08 Element Op Status = 2
20161229 23:34:08 Element Name = FAN 2 RPM
20161229 23:34:08 Element Op Status = 2
20161229 23:34:08 Element Name = FAN 1 RPM
20161229 23:34:08 Element Op Status = 2
20161229 23:34:08 Check classe OMC_PowerSupply

It stays at PowerSupply forever. On older vmware versions, the plugin still runs smooth.
Could you help me to fix this?
pywbem version 0.7.0 and python 2.7.5 is installed.
OS is Ubuntu 14.04

Thanks in advanced and a happy new year!

Regards,

Marcus

runtime Errors

Hello ,
Just installed the plugin under Ubuntu 16.04 including prerequisite (pywbem), when running the script on on terminal i get following error below , didn't found any earlier reference to it ,
Please advice
Thanks
Traceback (most recent call last): File "./check_esxi_hardware.py", line 249, in <module> import pywbem File "/usr/local/lib/python2.7/dist-packages/pywbem/__init__.py", line 36, in <module> from .cim_operations import * # noqa: F403,F401 File "/usr/local/lib/python2.7/dist-packages/pywbem/cim_operations.py", line 161, in <module> from .cim_http import get_object_header, wbem_request File "/usr/local/lib/python2.7/dist-packages/pywbem/cim_http.py", line 60, in <module> from M2Crypto import SSL # pylint: disable=wrong-import-position File "/usr/local/lib/python2.7/dist-packages/M2Crypto/__init__.py", line 26, in <module> from M2Crypto import (ASN1, AuthCookie, BIO, BN, DH, DSA, EVP, Engine, Err, File "/usr/local/lib/python2.7/dist-packages/M2Crypto/ASN1.py", line 15, in <module> from M2Crypto import BIO, m2, util File "/usr/local/lib/python2.7/dist-packages/M2Crypto/BIO.py", line 10, in <module> from M2Crypto import m2, util File "/usr/local/lib/python2.7/dist-packages/M2Crypto/m2.py", line 30, in <module> from M2Crypto._m2crypto import * File "/usr/local/lib/python2.7/dist-packages/M2Crypto/_m2crypto.py", line 26, in <module> __m2crypto = swig_import_helper() File "/usr/local/lib/python2.7/dist-packages/M2Crypto/_m2crypto.py", line 22, in swig_import_helper _mod = imp.load_module('__m2crypto', fp, pathname, description) ImportError: /usr/local/lib/python2.7/dist-packages/M2Crypto/__m2crypto.so: undefined symbol: SSLv3_method

Authentication Error with every non-root user

Hi Claudio,
using ESXi 6.5 I am currently fighting with Authgentication Errors.
I want to use a monitoring user and what I did so far was:
Create a user in vSphere Web Client with admin rights and also create a user local on the esxi, also with admin rights. Both gave me an authentication error and only the root user works.
Can you give me a hint how to fix this? I want to use a read-only user.
Anyway thanks again for the great plugin.

Unconfigured Disk flapping VMware ESXi 7.0.3

After the update to 7.0.3 the Plugin flapps between OK and Critical because of "Unconfigured Disk".
There are Unconfigured Disk shown also in vSphere but with 7.0.2 the Plugin ignored these free disk slots.

I can confirm this because I have a second ESXi Server with the same Model running vSphere 7.0.2.

Plugin Version "20210809"

Vendor HPE
Model ProLiant DL380 Gen10
Newest CIM Bundle from vibsdepot.hpe.com "HPE_bootbank_smx-provider_700.03.16.00.12-14828939.vib"

Traceback: pkg_resources.get_distribution("pywbem").version

Our system is still on CentOS-6 with Python-2.6 and pywbem-0.7.0, and we were having issues when connecting to a recent Dell OMSA. We updated this script to 20170905 and pywbem to 0.11.0 using pip. But after that the script fails:

# python ./check_esxi_hardware.py.orig --host=<fqdn> --user <user> --pass=<pass> -v dell
20180126 10:51:38 LCD Status: True
20180126 10:51:38 Connection to https://<fqdn>
Traceback (most recent call last):
  File "./check_esxi_hardware.py.orig", line 624, in <module>
    pywbemversion = pkg_resources.get_distribution("pywbem").version
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 292, in get_distribution
    if isinstance(dist,Requirement): dist = get_provider(dist)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 176, in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 648, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 546, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pywbem

The problem is in line 624, where it says:

pywbemversion = pkg_resources.get_distribution("pywbem").version

I'm not well-versed in Python, but I could make the script work when I change this into

pywbemversion = pywbem.__version__

Diff:

--- check_esxi_hardware.py.orig 2017-09-05 21:17:13.000000000 +0200
+++ check_esxi_hardware.py      2018-01-26 10:50:45.416058045 +0100
@@ -621,7 +621,7 @@
 # connection to host
 verboseoutput("Connection to "+hosturl)
 # pywbem 0.7.0 handling is special, some patched 0.7.0 installations work differently
-pywbemversion = pkg_resources.get_distribution("pywbem").version
+pywbemversion = pywbem.__version__
 verboseoutput("Found pywbem version "+pywbemversion)
 if '0.7.' in pywbemversion:
   try:

I don't know if this is the preferred way of doing things, but at least it solves the issue for us.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.