Template for troubleshooting posts
Here is the post template that you can use to make your issue clearer to everyone. Just edit out the sample placeholder texts.
Checkmk version:
2.2.0p18
OS version of Checkmk server or monitored system:
Ubuntu 22.04.1 Azure Edition (CheckMK Cloud Appliance)
Description of the problem : Insert description here
I created a custom extension/plugin to check a host’s service status as reporting in our Job Management System. So far, I have everything working except for the Service State.
The monitored service status shows the following:
check failed - please submit a crash report! (Crash-ID: 6c17fe30-ddcf-11ee-af27-95f85f287d62)
Error message and/or output from below commands:
Please use code blocks for pasting outputs and codes!
The error shown in the Crash view is:
Exception: KeyError (state)
Traceback:
File "/omd/sites/<removed>/lib/python3/cmk/base/agent_based/checking/_checking.py", line 413, in get_aggregated_result
consume_check_results(
File "/omd/sites/<removed>/lib/python3/cmk/base/api/agent_based/checking_classes.py", line
484, in consume_check_results
for subr in subresults:
File "/omd/sites/<removed>/lib/python3/cmk/base/api/agent_based/register/check_plugins.py", line 93, in filtered_generator
for element in generator(*args, **kwargs):
File >"/omd/sites/<removed>/local/lib/python3/cmk/base/plugins/agent_based/indesign_instance_status
.py", line 38, in check_indesign_instance_status
for service in section:
Local Variables
{'item': 'IDS2023C_queue',
'section': {'IDS2023A_queue': {'state': <State.OK: 0>, 'status': 'idle'},
'IDS2023B_queue': {'state': <State.OK: 0>, 'status': 'idle'},
'IDS2023C_queue': {'state': <State.OK: 0>, 'status': 'idle'}},
'service_info': {'state': <State.OK: 0>, 'status': 'idle'},
'services': {}}
Every other portion of the extension works perfectly though…
I’ve looked through everything in the script and it all looks right.
Does anyone have any ideas of what could be causing this?
Thanks!