Yogibaer75 / Check_MK-Things

From check plugins to website extensions
62 stars 17 forks source link

Lenovo XClarity crashes while trying to report temperature for non existing modules (version 3.0.0) #45

Closed tfoks closed 7 months ago

tfoks commented 7 months ago

Hello, the temperature check crashes while trying to report values for non existing devices.

E.g. the local variables in the crash report shows:

'DIMM 2 Temp': {'@odata.id': '/redfish/v1/Chassis/1/Thermal#/Temperatures/6',
             'LowerThresholdCritical': None,
             'LowerThresholdFatal': None,
             'LowerThresholdNonCritical': None,
             'MaxReadingRangeTemp': None,
             'MemberId': '6',
             'MinReadingRangeTemp': None,
             'Name': 'DIMM 2 Temp',
             'PhysicalContext': 'Memory',
             'ReadingCelsius': None,
             'RelatedItem': [{'@odata.id': 'Max recursion '
                                           'depth reached'},
                             {'@odata.id': 'Max recursion '
                                           'depth reached'}],
             'SensorNumber': 82,
             'Status': {'Health': None, 'State': 'Disabled'},
             'UpperThresholdCritical': None,
             'UpperThresholdFatal': None,
             'UpperThresholdNonCritical': None},

Most fields report "None' which in this case is correct as there is no DIMM in this slot.

The check thows

TypeError (float() argument must be a string or a real number, not 'NoneType')

Crash Type check Operating System Ubuntu 22.04.3 LTS Checkmk Version 2.2.0p20 Edition cre Core nagios Python Version 3.11.5 (main, Nov 30 2023, 14:57:54) [GCC 13.2.0] Python Module Paths /omd/sites/psupport/local/lib/python3 /omd/sites/psupport/lib/python3/cloud /omd/sites/psupport/lib/python311.zip /omd/sites/psupport/lib/python3.11 /omd/sites/psupport/lib/python3.11/lib-dynload /omd/sites/psupport/lib/python3.11/site-packages /omd/sites/psupport/lib/python3

Yogibaer75 commented 7 months ago

Hello, please can you check with the unified Redfish plugin on your machine. The vendor specific versions are not developed further. The unified agent already has fixed the problem your have.

Actual version of this agent you can finde here. https://github.com/Yogibaer75/Check_MK-Things/tree/master/check%20plugins%202.2/redfish