CMK version: OMD - Open Monitoring Distribution Version 2.2.0p10.cre
OS version: Rocky Linux release 8.8 (Green Obsidian)
Error message: check_icmp: Failed to obtain ICMP socket: Operation not permitted
When I’m adding a host to check_mk, the host appears DOWN and says “check_icmp: Failed to obtain ICMP socket: Operation not permitted”. After checking forum I can’t figure out why it’s not working.
Site infos :
OMD[SITENAME]:~/lib/nagios/plugins$ id
uid=381(SITENAME) gid=1009(SITENAME) groups=1009(SITENAME),391(omd)
check infos :
OMD[SITENAME]:~/lib/nagios/plugins$ ls -l check_icmp
-rwxr-x--- 1 root omd 65240 Sep 19 11:18 check_icmp*
caps info: (as I read, it now works with cap and no longer with suid)
OMD[SITENAME]:~/lib/nagios/plugins$ getcap check_icmp
check_icmp cap_net_raw=ep
Trying to run the check:
OMD[SITENAME]:~/lib/nagios/plugins$ ./check_icmp -vvvvv -4 -H 192.168.0.1
Warning: no SO_TIMESTAMP support
check_icmp: Failed to obtain ICMP socket: Operation not permitted
When I’m running the check as root user it’s working
At first I thought this was the only problem but here you ask to run “cmk --debug -vvn hostname” command which returns an error (on each host) :
Output of “cmk --debug -vvn hostname”: (If it is a problem with checks or plugins)
Files: ([], None)
Traceback (most recent call last):
File "/omd/sites/SITENAME/lib/python3/cmk/base/config.py", line 2264, in _extract_agent_and_snmp_sections
create_snmp_section_plugin_from_legacy(
File "/omd/sites/SITENAME/lib/python3/cmk/base/api/agent_based/register/section_plugins_legacy/__init__.py", line 245, in create_snmp_section_plugin_from_legacy
detect_spec = create_detect_spec(
^^^^^^^^^^^^^^^^^^^
File "/omd/sites/SITENAME/lib/python3/cmk/base/api/agent_based/register/section_plugins_legacy/convert_scan_functions.py", line 419, in create_detect_spec
_compute_detect_spec(
File "/omd/sites/SITENAME/lib/python3/cmk/base/api/agent_based/register/section_plugins_legacy/convert_scan_functions.py", line 387, in _compute_detect_spec
scan_func_ast = _get_scan_function_ast(section_name, scan_function, fallback_files)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/omd/sites/SITENAME/lib/python3/cmk/base/api/agent_based/register/section_plugins_legacy/convert_scan_functions.py", line 110, in _get_scan_function_ast
assert source != "", "Files: %r" % ((read_files, src_file_name),)
^^^^^^^^^^^^
AssertionError: Files: ([], None)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/omd/sites/SITENAME/bin/cmk", line 97, in <module>
errors = config.load_all_agent_based_plugins(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/omd/sites/SITENAME/lib/python3/cmk/base/config.py", line 1681, in load_all_agent_based_plugins
errors.extend(load_checks(get_check_api_context, filelist))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/omd/sites/SITENAME/lib/python3/cmk/base/config.py", line 1822, in load_checks
return _extract_agent_and_snmp_sections(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/omd/sites/SITENAME/lib/python3/cmk/base/config.py", line 2285, in _extract_agent_and_snmp_sections
raise MKGeneralException(exc) from exc
cmk.utils.exceptions.MKGeneralException: Files: ([], None)
I don’t know if the two problems are related.
If you need more information I’d be glad to give them to you.
Thanks,