Skip to content

redfish-sensor: TypeError: ''=' not supported between instances of 'float' and 'str' #916

@daniel-tihanyi

Description

@daniel-tihanyi

This issue respects the following points:

Which variant of the Monitoring Plugins do you use?

  • .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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions