Local check set up problem

CMK version:2.0.0p12
OS version:Ubuntu 20.04.3 LTS

Output of “cmk --debug -vvn hostname”:


Precompile /omd/sites/XXX/local/share/check_mk/checks/temperature.include to /omd/sites/XXX/var/check_mk/precompiled_checks/local/temperature.include
Error in check include file /omd/sites/XXX/local/share/check_mk/checks/temperature.include: [Errno 2] No such file or directory: '/omd/sites/XXX/local/share/check_mk/checks/temperature.include'
Error in plugin file /omd/sites/XXX/local/share/check_mk/checks/enviromux: [Errno 2] No such file or directory: '/omd/sites/XXX/local/share/check_mk/checks/temperature.include'
Trying to acquire lock on /omd/sites/XXX/var/check_mk/crashes/base/f90652fc-5d88-11ec-9a25-a556be169548/crash.info
Got lock on /omd/sites/XXX/var/check_mk/crashes/base/f90652fc-5d88-11ec-9a25-a556be169548/crash.info
Releasing lock on /omd/sites/XXX/var/check_mk/crashes/base/f90652fc-5d88-11ec-9a25-a556be169548/crash.info
Released lock on /omd/sites/XXX/var/check_mk/crashes/base/f90652fc-5d88-11ec-9a25-a556be169548/crash.info
Traceback (most recent call last):
  File "/omd/sites/XXX/bin/cmk", line 79, in <module>
    errors = config.load_all_agent_based_plugins(check_api.get_check_api_context)
  File "/omd/sites/XXX/lib/python3/cmk/base/config.py", line 1426, in load_all_agent_based_plugins
    errors.extend(load_checks(get_check_api_context, filelist))
  File "/omd/sites/XXX/lib/python3/cmk/base/config.py", line 1504, in load_checks
    did_compile |= load_check_includes(f, check_context)
  File "/omd/sites/XXX/lib/python3/cmk/base/config.py", line 1621, in load_check_includes
    did_compile |= load_precompiled_plugin(include_file_path, check_context)
  File "/omd/sites/XXX/lib/python3/cmk/base/config.py", line 1785, in load_precompiled_plugin
    py_compile.compile(path, precompiled_path, doraise=True)
  File "/omd/sites/XXX/lib/python3.8/py_compile.py", line 142, in compile
    source_bytes = loader.get_data(file)
  File "<frozen importlib._bootstrap_external>", line 972, in get_data
FileNotFoundError: [Errno 2] No such file or directory: '/omd/sites/XXX/local/share/check_mk/checks/temperature.include'

(If it is a problem with checks or plugins)

Good Day @all =),

since yesterday i try to setup my first “local check” (Found file log4j?)but it is not working… :frowning:

I set up everything like in the topic i have linked above.

In checkmk itself for the host iam not getting this service.

From the Error analysis i get this information:

“5.2. Testing agent output on the target host”:
No Result, only a blank line.

“5.3. Testing agent output on the Checkmk server”:

Error in check include file /omd/sites/XXX/local/share/check_mk/checks/temperature.include: [Errno 2] No such file or directory: '/omd/sites/XXX/local/share/check_mk/checks/temperature.include'
Error in check include file /omd/sites/XXX/local/share/check_mk/checks/humidity.include: [Errno 2] No such file or directory: '/omd/sites/XXX/local/share/check_mk/checks/humidity.include'
Discovering services and host labels on: target_host.target_host.de
target_host.target_host.de:
+ FETCHING DATA
[TCPFetcher] Execute data source
No piggyback files for 'target_host.target_host.de'. Skip processing.
No piggyback files for 'ip_target_host.target_host.de'. Skip processing.
[PiggybackFetcher] Execute data source
+ PARSE FETCHER RESULTS
Received no piggyback data
+ EXECUTING HOST LABEL DISCOVERY
+ PERFORM HOST LABEL DISCOVERY
+ EXECUTING DISCOVERY PLUGINS (1)
SUCCESS - Found no services, no host labels

===============

Error in check include file /omd/sites/XXX/local/share/check_mk/checks/temperature.include: [Errno 2] No such file or directory: '/omd/sites/XXX/local/share/check_mk/checks/temperature.include'
Error in check include file /omd/sites/XXX/local/share/check_mk/checks/humidity.include: [Errno 2] No such file or directory: '/omd/sites/XXX/local/share/check_mk/checks/humidity.include'
Checkmk version 2.0.0p12
+ FETCHING DATA
[TCPFetcher] Execute data source
No piggyback files for 'target_host.target_host.de'. Skip processing.
No piggyback files for 'ip_target_host.target_host.de'. Skip processing.
[PiggybackFetcher] Execute data source
+ PARSE FETCHER RESULTS
Received no piggyback data
[agent] Version: unknown, OS: unknown, execution time 0.6 sec | execution_time=0.560 user_time=0.060 system_time=0.000 children_user_time=0.000 children_system_time=0.000 cmk_time_agent=0.490

I used the search of the forum und tried some ideas and solutions from there but without success. Maybe someone else have an idea oder the solution for my problem. :slight_smile:

Hi CheckmkRG

To avoid misunderstandings: A local check is a (simple) check script that is run directly on a monitored host. Checkmk uses its output as-is and does not itself do any checking. This is what the documentation you linked describes: Local checks

As such, the FileNotFoundError you are encountering above will not be caused by a local check. Rather it could be caused by some pre checkmk 2.0 plugin that is still installed on your checkmk site.

This means, you will most likely be facing two unrelated issues here.

To (hopefully) guide you in the right direction, I have the following questions:

  • What check for log4j are you actually using? Did you install the MKP provided by @thl-cmk on Checkmk Exchange?
  • What OS does the host run you are trying to monitor with this log4j plugin?
  • Are there any checks inside the folder local/share/check_mk/checks and if so, does any of these files mention temperature.include or humidity.include?

Kind regards

2 Likes

As addition to the hints from @ttrafelet i would said that the file not found is something that happens after the upgrade to 2.0 if you had before some checks installed inside local/share/check_mk/checks. But this message als stays after you removed the old plugins. The cause for this is that CMK caches the precompiled checks inside the following folders.
~/tmp/check_mk/check_includes/local
and
~/var/check_mk/precompiled_checks/local
If you cleanup booth folders and get again the error message then there must be some old plugins inside local/share/check_mk/checks who try to use these files.
Here inside this Werk you find the description what needs to be done with old plugins and includes.

3 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.