Check_MK-Things
Check_MK-Things copied to clipboard
Redfish plugin crashes with iLO 6 FW 1.59
I observed that the Redfish plugin crashes when monitoring a iLO 6 system (Firmware 1.59).
The excpetion is TypeError: 'item' must be a non empty string or ommited entirely, got ''
Stacktrace:
{
"exc_traceback": [
["/omd/sites/mysite/lib/python3/cmk/base/cee/keepalive/checker.py", 211, "_process_fetch_entry", "check_result = execute_check_discovery("],
["/omd/sites/mysite/lib/python3/cmk/base/agent_based/discovery/_discovery.py", 119, "execute_check_discovery", "services = get_host_services("],
["/omd/sites/mysite/lib/python3/cmk/base/agent_based/discovery/autodiscovery.py", 593, "get_host_services", "**_get_node_services("],
["/omd/sites/mysite/lib/python3/cmk/base/agent_based/discovery/autodiscovery.py", 625, "_get_node_services", "service_result = analyse_discovered_services("],
["/omd/sites/mysite/lib/python3/cmk/base/agent_based/discovery/_discovered_services.py", 43, "analyse_discovered_services", "discovered_services=_discover_services("],
["/omd/sites/mysite/lib/python3/cmk/base/agent_based/discovery/_discovered_services.py", 151, "_discover_services", "{"],
["/omd/sites/mysite/lib/python3/cmk/base/agent_based/discovery/_discovered_services.py", 151, "<dictcomp>", "{"],
["/omd/sites/mysite/lib/python3/cmk/base/agent_based/discovery/_discovered_services.py", 304, "_discover_plugins_services", "yield from ("],
["/omd/sites/mysite/lib/python3/cmk/base/agent_based/discovery/_discovered_services.py", 304, "<genexpr>", "yield from ("],
["/omd/sites/mysite/lib/python3/cmk/base/api/agent_based/register/check_plugins.py", 73, "filtered_generator", "for element in generator(*args, **kwargs):"],
["/omd/sites/mysite/local/lib/python3/cmk/base/plugins/agent_based/redfish_voltage.py", 35, "discovery_redfish_voltage", "yield Service(item=entry[\"Name\"])"],
["/omd/sites/mysite/lib/python3/cmk/base/api/agent_based/checking_classes.py", 73, "__new__", "item=cls._parse_item(item),"],
["/omd/sites/mysite/lib/python3/cmk/base/api/agent_based/checking_classes.py", 84, "_parse_item", "raise TypeError(\"'item' must be a non empty string or ommited entirely, got %r\" % (item,))"]
]
}
The following output from the agent seems to trigger the issue. The "name" field is set to an empty string which causes the exception.
{
"Voltages": [{
"@odata.id": "/redfish/v1/Chassis/1/Power#Voltages/0",
"LowerThresholdCritical": 30500,
"LowerThresholdFatal": 65535,
"LowerThresholdNonCritical": 31400,
"MemberId": "0",
"Name": "",
"ReadingVolts": 32967,
"Status": {
"Health": "OK",
"State": "Enabled"
},
"UpperThresholdCritical": 35500,
"UpperThresholdFatal": 65535,
"UpperThresholdNonCritical": 34700
}]
}
My environment:
- OS: Debian GNU/Linux 11 (bullseye)
- Python version: 3.11.5
- CheckMK Version: 2.2.0p22
- CheckMK edition: cme
I see the problem but for a real fix i need to Redfish dump created with this tool. https://github.com/DMTF/Redfish-Mockup-Creator My iLO6 dump i have is version 1.54 This iLO6 version has no Voltages inside. It is very possible that this is a firmware bug from HPE side. But if it should be fixed - please sent me an Redfish dump - also as PM inside CMK Forum possible. Don't need to post it here.
I had the same problem with some ILO 6 this week, Andreas already has written a fix for that. The problem is, that the voltage sensors don´t have an item name but the sensor name is being output as "".
Starting with version 2.3.50 this should be no issue anymore. Fixed with 6552469