Closed JF-JX closed 2 months ago
Hello,
That is not a bug in the Plugin, the exception is caused by missing data from the special agent. This can because of missing permissions or a wrong configuration. Worst case some changes in their API.
Hi Bastian, Permissions are correct. If I look in the output of cmk -d, I do get a lot of data back. But at first sight, this doesn't look right...every node appears twice: first line says "node-name-xy failed" second line says "node-name-xy ok" and appends all the node service names.
Wait no, thats actually fine. But I think the problem is that you do: services = (row[2:][0]).split(',') but there are some lines where no third element exists, which leads to the IndexError.
Hi
Could you show some example output?
Sure, here's an example:
<<
:)
okay there are weird line breaks, the servicenames are in fact right after the "ok" ^^
Can you test the new MKP if i fixed your problem?
Works now, thanks!
My pleasure
Error Message: "Parsing of section cohesity_node_status failed - please submit a crash report!"
Output of cmk --debug: Traceback (most recent call last): File "/omd/sites/mysite/bin/cmk", line 120, in
exit_status = modes.call("--check", None, opts, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/omd/sites/mysite/lib/python3/cmk/base/modes/init.py", line 70, in call
return handler(handler_args)
^^^^^^^^^^^^^^^^^^^^^^
File "/omd/sites/mysite/lib/python3/cmk/base/modes/check_mk.py", line 2137, in mode_check
with (
File "/omd/sites/mysite/lib/python3/cmk/base/errorhandling/_handler.py", line 66, in exit
_handle_failure(
^^^^^^^^^^^^^^^^
File "/omd/sites/mysite/lib/python3/cmk/base/errorhandling/_handler.py", line 103, in _handle_failure
raise exc
File "/omd/sites/mysite/lib/python3/cmk/base/modes/check_mk.py", line 2153, in mode_check
checks_result = execute_checkmk_checks(
^^^^^^^^^^^^^^^^^^^^^^^
File "/omd/sites/mysite/lib/python3/cmk/checkengine/checking/_checking.py", line 83, in execute_checkmk_checks
service_results = list(
^^^^^
File "/omd/sites/mysite/lib/python3/cmk/checkengine/checking/_checking.py", line 216, in check_host_services
yield plugin.function(host_name, service, providers=providers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/omd/sites/mysite/lib/python3/cmk/base/checkers.py", line 425, in check_function
return get_aggregated_result(
^^^^^^^^^^^^^^^^^^^^^^
File "/omd/sites/mysite/lib/python3/cmk/base/checkers.py", line 690, in get_aggregated_result
section_kws, error_result = _get_monitoring_data_kwargs(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/omd/sites/mysite/lib/python3/cmk/base/checkers.py", line 611, in _get_monitoring_data_kwargs
get_section_kwargs(
File "/omd/sites/mysite/lib/python3/cmk/checkengine/sectionparserutils.py", line 42, in get_section_kwargs
if (resolved := resolver.resolve(name)) is not None
^^^^^^^^^^^^^^^^^^^^^^
File "/omd/sites/mysite/lib/python3/cmk/checkengine/sectionparser.py", line 181, in resolve
parsing_result := self._parser.parse(producer_name, producer.parse_function)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/omd/sites/mysite/lib/python3/cmk/checkengine/sectionparser.py", line 92, in parse
if (parsed := self._parse_raw_data(section_name, parse_function)) is None
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/omd/sites/mysite/lib/python3/cmk/checkengine/sectionparser.py", line 113, in _parse_raw_data
return parse_function(list(raw_data))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/omd/sites/mysite/local/lib/python3/cmk/base/plugins/agent_based/cohesity_node_status.py", line 18, in parse_cohesity_node_status
services = row[2:][0].split(',')