CMK version: 2.4.36 community
OS version: Oracle Linux 8.10
Error message: see below
Hi,
After upgrading checkmk community from 2.3.47 to 2.4.36 some check started crashing.
It’s the oracle_sql check in the oracle plugin “mk_oracle” that crashes. The section where you can have your own sql queries.
I have 3 different checks that use this section. All of them crash.
When I run the agent locally, the output is fine. Also when I run the agent output on the checkmk gui, I get the output correctly. But the service shows that it has crashed. I haven’t changed anything in the sql query or config. Agents upgraded to 2.4.36 dont’t work, neither do the ones that have the old 2.3 version.
The crash report says the following
Exception:
ValueError ('notice' must be non-empty str or None, got )
Traceback:
File "/omd/sites/sysco_prod01/lib/python3/cmk/base/checkers.py", line 912, in get_aggregated_result
check_result = check_function(**item_kw, **params_kw, **section_kws)
File "/omd/sites/sysco_prod01/lib/python3/cmk/base/checkers.py", line 685, in __check_function
return _aggregate_results(consume_check_results(check_function(*args, **kw)))
File "/omd/sites/sysco_prod01/lib/python3/cmk/base/checkers.py", line 757, in consume_check_results
for subr in subresults:
File "/omd/sites/sysco_prod01/lib/python3/cmk/base/api/agent_based/register/check_plugins.py", line 96, in filtered_generator
for element in generator(*args, **kwargs):
File "/omd/sites/sysco_prod01/lib/python3/cmk/plugins/oracle/agent_based/oracle_sql.py", line 184, in check_oracle_sql
yield Result(state=State.OK, notice="\n".join(long))
File "/omd/sites/sysco_prod01/lib/python3.12/site-packages/cmk/agent_based/v1/_checking_classes.py", line 408, in new
state, summary, details = _create_result_fields(**kwargs) # type: ignore[misc]
File "/omd/sites/sysco_prod01/lib/python3.12/site-packages/cmk/agent_based/v1/_checking_classes.py", line 447, in _create_result_fields
raise ValueError(f"'{name}' must be non-empty str or None, got {var}")
'notice' must be non-empty str or None, got
Local variables:
{'details': None,
'name': 'notice',
'notice': '',
'state': <State.OK: 0>,
'summary': None,
'var': ''}
It appears that it’s the python code on the checkmk server that cannot handle the code. But I don’t understand the meaning of the errors. And I suppose that I shouldn’t fiddle with the server code, right?
Has something changed in the behavior on the server side regarding the mk_oracle sql check section from 2.3 to 2.4?
I know that in version 2.5 the whole oracle plugin (mk_oracle) has been rewritten and has a new name, mk-oracle. But I’m not using this new plugin as it is not available for 2.4.
Anyone that can help me out on this?
Thank you,
/ric