iteratio-com / Exchange

Checkmk extensions for the public exchange
4 stars 2 forks source link

SAP-MaxDB checkmk plugin services crash if DB is offline #19

Open seebus opened 5 months ago

seebus commented 5 months ago

If the state of the DB is offline, the services in the checkmk gui fail:

DB state from maxdb.py: <<>> [[DB]] OK State OFFLINE

  | UNKN | MaxDB PL3 Cache Hitrate | check failed - please submit a crash report! (Crash-ID: becb073f-23e6-11ef-8784-6045bd90166d)   | UNKN | MaxDB PL3 Data | check failed - please submit a crash report! (Crash-ID: becb073d-23e6-11ef-8784-6045bd90166d)   | UNKN | MaxDB PL3 Info | check failed - please submit a crash report! (Crash-ID: becb0740-23e6-11ef-8784-6045bd90166d)   | UNKN | MaxDB PL3 Log | check failed - please submit a crash report! (Crash-ID: becb073e-23e6-11ef-8784-6045bd90166d)   | UNKN | MaxDB PL3 Sessions | check failed - please submit a crash report! (Crash-ID: becb073c-23e6-11ef-8784-6045bd90166d)

Shouldn't there be a catch for the services if the db is offline instead of a crash report?

Ma7h1 commented 5 months ago

Hello,

can you send me the agent output or the crash report or attach it here?

Greetings Mathias

seebus commented 5 months ago

Of course, here are the 4 crash reports:

image

Exception
ZeroDivisionError (float division by zero) Traceback
File "/omd/sites/indicokunden/lib/python3/cmk/base/checkers.py", line 716, in get_aggregated_result check_result = check_function(item_kw, params_kw, section_kws) File "/omd/sites/indicokunden/lib/python3/cmk/base/checkers.py", line 496, in __check_function return _aggregate_results(consume_check_results(check_function(*args, *kw))) File "/omd/sites/indicokunden/lib/python3/cmk/base/checkers.py", line 554, in consume_check_results for subr in subresults: File "/omd/sites/indicokunden/lib/python3/cmk/base/api/agent_based/register/check_plugins.py", line 91, in filtered_generator for element in generator(args, kwargs): File "/omd/sites/indicokunden/local/lib/python3/cmk/base/plugins/agent_based/maxdb_data.py", line 99, in check_maxdb_log 100.0 * used_log_pages_size / log_pages_size,

Exception
AttributeError ('NoneType' object has no attribute 'lower') Traceback
File "/omd/sites/indicokunden/lib/python3/cmk/base/checkers.py", line 716, in get_aggregated_result check_result = check_function(item_kw, params_kw, section_kws) File "/omd/sites/indicokunden/lib/python3/cmk/base/checkers.py", line 496, in __check_function return _aggregate_results(consume_check_results(check_function(*args, *kw))) File "/omd/sites/indicokunden/lib/python3/cmk/base/checkers.py", line 554, in consume_check_results for subr in subresults: File "/omd/sites/indicokunden/lib/python3/cmk/base/api/agent_based/register/check_plugins.py", line 91, in filtered_generator for element in generator(args, kwargs): File "/omd/sites/indicokunden/local/lib/python3/cmk/base/plugins/agent_based/maxdb_state.py", line 82, in check_maxdb_state yield Result(state=State(0 if data.get('AUTOSAVESTANDBY').lower() ==

Exception
TypeError (unsupported operand type(s) for *: 'float' and 'NoneType') Traceback
File "/omd/sites/indicokunden/lib/python3/cmk/base/checkers.py", line 716, in get_aggregated_result check_result = check_function(item_kw, params_kw, section_kws) File "/omd/sites/indicokunden/lib/python3/cmk/base/checkers.py", line 496, in __check_function return _aggregate_results(consume_check_results(check_function(*args, *kw))) File "/omd/sites/indicokunden/lib/python3/cmk/base/checkers.py", line 554, in consume_check_results for subr in subresults: File "/omd/sites/indicokunden/lib/python3/cmk/base/api/agent_based/register/check_plugins.py", line 91, in filtered_generator for element in generator(args, kwargs): File "/omd/sites/indicokunden/local/lib/python3/cmk/base/plugins/agent_based/maxdb_data.py", line 158, in check_maxdb_data 100.0 * used_size / usable_size,

Exception
TypeError (float() argument must be a string or a real number, not 'NoneType') Traceback
File "/omd/sites/indicokunden/lib/python3/cmk/base/checkers.py", line 716, in get_aggregated_result check_result = check_function(item_kw, params_kw, section_kws) File "/omd/sites/indicokunden/lib/python3/cmk/base/checkers.py", line 496, in __check_function return _aggregate_results(consume_check_results(check_function(*args, *kw))) File "/omd/sites/indicokunden/lib/python3/cmk/base/checkers.py", line 554, in consume_check_results for subr in subresults: File "/omd/sites/indicokunden/lib/python3/cmk/base/api/agent_based/register/check_plugins.py", line 91, in filtered_generator for element in generator(args, kwargs): File "/omd/sites/indicokunden/local/lib/python3/cmk/base/plugins/agent_based/maxdb_data.py", line 210, in check_maxdb_hitrate float(section.get(item, {}).get('DATACACHE_HITRATE')),

Ma7h1 commented 2 months ago

Hi, can you send me the lines from the Agent output. check_mk Service -> download Agentouput and then only the Content of "<<<maxdb...." Cheers Mathias