CMK version:
2.2.0p23
OS version:
Ubuntu 22.04 (und Kubernetes 1.27.14 rke2)
Error message:
ValueError (not enough values to unpack (expected 2, got 1))
Traceback:
File "/omd/sites/nms_k8s/lib/python3/cmk/base/agent_based/data_provider.py", line 106, in _parse_raw_data
return parse_function(list(raw_data))
File "/omd/sites/nms_k8s/lib/python3/cmk/base/plugins/agent_based/section_lnx_container_host_if.py", line 138, in parse_lnx_container_host_if
return [_create_interface(_parse_raw_stats(i)) for i in string_table], {}
File "/omd/sites/nms_k8s/lib/python3/cmk/base/plugins/agent_based/section_lnx_container_host_if.py", line 138, in <listcomp>
return [_create_interface(_parse_raw_stats(i)) for i in string_table], {}
File "/omd/sites/nms_k8s/lib/python3/cmk/base/plugins/agent_based/section_lnx_container_host_if.py", line 47, in _parse_raw_stats
k, v = stats.split("\v")
Local Variables:
{'k': 'tx_dropped',
'line': ['name\x0bbonding_masters',
'ifindex\x0b',
'ifalias\x0b',
'address\x0b',
'type\x0b',
'carrier\x0b',
'speed\x0b',
'rx_bytes\x0b',
'rx_packets\x0b',
'rx_errors\x0b',
'rx_dropped\x0b',
'multicast\x0b',
'tx_bytes\x0b',
'tx_packets\x0b',
'tx_errors\x0b',
'tx_dropped\x0b',
'tx_fifo_errors'],
'raw_stats': {'address': '',
'carrier': '',
'ifalias': '',
'ifindex': '',
'multicast': '',
'name': 'bonding_masters',
'rx_bytes': '',
'rx_dropped': '',
'rx_errors': '',
'rx_packets': '',
'speed': '',
'tx_bytes': '',
'tx_dropped': '',
'tx_errors': '',
'tx_packets': '',
'type': ''},
'stats': 'tx_fifo_errors',
'v': ''}
The problem lies in the output of the check_mk_agent, specifically in the lnx_container_host_if.linux script which does not properly check whether it is a file or a folder. In my case I use network bonding which creates the file bonding_masters in the folder /sys/class/net/. This should be ignored by the script, which is currently not happening.