Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Discovery crashes #7

Open
Jay2k1 opened this issue Feb 18, 2023 · 1 comment
Open

Discovery crashes #7

Jay2k1 opened this issue Feb 18, 2023 · 1 comment

Comments

@Jay2k1
Copy link

Jay2k1 commented Feb 18, 2023

Hi,

I was super happy to find a proper check for TS3, I've installed the mkp, copied the check, created a .cfg and tried running the plugin, works just fine. Then I went to discover new services, but the discovery crashes.

Exception:

ValueError (item must be None or of type `str`)

Traceback:

  File "/omd/sites/monitoring/lib/python3/cmk/base/agent_based/decorator.py", line 43, in wrapped_check_func
    status, output_text = _combine_texts(check_func(hostname, *args, **kwargs))
  File "/omd/sites/monitoring/lib/python3/cmk/base/agent_based/discovery/__init__.py", line 578, in active_check_discovery
    services = _get_host_services(
  File "/omd/sites/monitoring/lib/python3/cmk/base/agent_based/discovery/__init__.py", line 1023, in _get_host_services
    **_get_node_services(
  File "/omd/sites/monitoring/lib/python3/cmk/base/agent_based/discovery/__init__.py", line 1048, in _get_node_services
    service_result = analyse_discovered_services(
  File "/omd/sites/monitoring/lib/python3/cmk/base/agent_based/discovery/_discovered_services.py", line 46, in analyse_discovered_services
    discovered_services=_discover_services(
  File "/omd/sites/monitoring/lib/python3/cmk/base/agent_based/discovery/_discovered_services.py", line 145, in _discover_services
    {
  File "/omd/sites/monitoring/lib/python3/cmk/base/agent_based/discovery/_discovered_services.py", line 145, in <dictcomp>
    {
  File "/omd/sites/monitoring/lib/python3/cmk/base/agent_based/discovery/_discovered_services.py", line 280, in _discover_plugins_services
    yield from (
  File "/omd/sites/monitoring/lib/python3/cmk/base/agent_based/discovery/_discovered_services.py", line 280, in <genexpr>
    yield from (
  File "/omd/sites/monitoring/lib/python3/cmk/base/api/agent_based/register/check_plugins.py", line 74, in filtered_generator
    for element in generator(*args, **kwargs):
  File "/omd/sites/monitoring/lib/python3/cmk/base/api/agent_based/register/check_plugins_legacy.py", line 90, in discovery_migration_wrapper
    raise ValueError("item must be None or of type `str`")

Local Variables:

{
	'check_info_dict': {
		'check_function': <function check_teamspeak3 at 0x7f12adf575e0>,
		 'default_levels_variable': None,
		 'extra_sections': [],
		 'group': None,
		 'handle_empty_info': False,
		 'handle_real_time_checks': False,
		 'has_perfdata': True,
		 'inventory_function': <function inventory_teamspeak3 at 0x7f12adf57550>,
		 'management_board': None,
		 'node_info': False,
		 'parse_function': <function parse_teamspeak3 at 0x7f12b12870d0>,
		 'service_description': 'Teamspeak3 %s',
		 'snmp_info': None,
		 'snmp_scan_function': None
	},
	 'check_name': 'Teamspeak3',
	 'disco_func': <function inventory_teamspeak3 at 0x7f12adf57550>,
	 'element': (9987, {'autostart': 'yes', 'status': 'online'}),
	 'get_check_context': <function get_check_context at 0x7f12afddb310>,
	 'item': 9987,
	 'original_discovery_result': <generator object inventory_teamspeak3 at 0x7f12ac6f3cf0>,
	 'parameters': {},
	 'raw_params': {'autostart': 'yes', 'status': 'online'},
	 'section': {
		'AuthSuccess': 'Yes',
		'Build': '1655727713',
		'ConfigError': 'No',
		'Platform': 'Linux',
		'QueryPortReachable': 'Yes',
		'Version': '3.13.7',
		'VirtualServer': {
			9987: {
				'autostart': 'yes',
				'channels': 0,
				'clientsmax': 32,
				'clientsonline': 0,
				'egress': 20128,
				'ingress': 15639,
				'port': 9987,
				'status': 'online'
			}
		}
	},
	'service': ('Global', {}, [])
}

I am using Checkmk Raw Edition 2.1.0p21.

@Jay2k1
Copy link
Author

Jay2k1 commented Feb 19, 2023

Turns out this bug was already fixed by cbee9e4 - just that no new .mkp was made. Since most users will probably just download and install that, could you please make a new .mkp?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant