monitoring-plugins
monitoring-plugins copied to clipboard
redfish-sensor: TypeError: ''=' not supported between instances of 'float' and 'str'
This issue respects the following points:
- [x] This is a bug, not a question or a setup/configuration issue.
- [x] This issue is not already reported on Github (I've searched it).
- [x] I use the latest release of the Monitoring Plugins (https://github.com/Linuxfabrik/monitoring-plugins/releases).
- [x] I agree to follow Monitoring Plugins's Code of Conduct.
Which variant of the Monitoring Plugins do you use?
- [x] .rpm/.deb package from repo.linuxfabrik.ch
- [ ] Compiled for Windows from download.linuxfabrik.ch
- [ ] Source Code from GitHub
Bug description
Hello, after upgrading from linuxfabrik-monitoring-plugins versions 1.2.0.11-1 to v2.1.1, the redis-sensor check stopped working. Running it results in the following error:
Traceback (most recent call last):
File "/usr/lib64/nagios/plugins/./redfish-sensor", line 273, in 'module'
main()
File "/usr/lib64/nagios/plugins/./redfish-sensor", line 209, in main
sensor_data_value_state = lib.redfish.get_sensor_state(sensor_data, 'Reading')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/linuxfabrik-monitoring-plugins/venv/lib/python3.12/site-packages/lib/redfish.py", line 585, in get_sensor_state
if data.get('Thresholds_UpperCritical') is not None and value '= data['Thresholds_UpperCritical']:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: ''=' not supported between instances of 'float' and 'str'
This seem to have been introduced in linuxfabrik-monitoring-plugins version 2.0.0-1. Downgrading to 1.2.0.11-1 solves this issue. Thank you!
Steps to reproduce - Plugin call
./redfish-sensor --url https://idrac-url --password "idrac-password" --username idrac-username
Steps to reproduce - Data
No response
Environment
Linux hostname 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux The issue happens with both Dell and Lenovo Redfish.
Plugin Version
redfish-sensor: v2024031401 by Linuxfabrik GmbH, Zurich/Switzerland
Python version
No response
List of Python modules
No response
Additional Information
No response