CMK version: Checkmk Raw Edition 2.3.0p24 (DOCKER)
OS version: Ubuntu 22.04
Error message: Logwatch doesn’t show output
Hello,
recently I installed the CheckMK agent for an Alpine VM of ours. (Used this guide: Checkmk Agent für Alpine Linux – bachmann-lan.de) and it’s working fine as of now.
However, I need to monitor some of our logs and I tried to do that using logwatch.
I created the file in /etc/check_mk/logwatch.cfg and it contains the following to test the
config:
/var/log/error.log
C error
I also placed the logwatch script on the target host: /usr/lib/check_mk_agent/plugins/mk_logwatch.py
When executing this script i get:
python /usr/lib/check_mk_agent/plugins/mk_logwatch.py -d
Traceback (most recent call last):
File "/usr/lib/check_mk_agent/plugins/mk_logwatch.py", line 1352, in <module>
main()
File "/usr/lib/check_mk_agent/plugins/mk_logwatch.py", line 1280, in main
global_options, logfiles_config, cluster_config = read_config(
^^^^^^^^^^^^
File "/usr/lib/check_mk_agent/plugins/mk_logwatch.py", line 406, in read_config
raise IOError("Did not find any content in config files: %s" % ", ".join(files))
OSError: Did not find any content in config files: ./logwatch.cfg
However, if I place the logwatch.cfg in ./ i get:
python /usr/lib/check_mk_agent/plugins/mk_logwatch.py -d
<<<logwatch>>>
[[[/var/log/error.log]]]
BATCH: 1738664528-253092060014179212050089141025188009247090182017
After restarting the check_mk_agent and reinventorizing it, I still can’t see any output.
The <<< logwatch >>> section is completely missing from the agent output.
Could this be due to the way the CheckMK Agent is installed on alpine (as it is not native)?
Has anyone encountered similar problems or has any idea on how to solve this?
(I have logwatch installed on other machines that look identical to my inital setup, but for whatever reason it just doesn’t seem to work for this host.)
Thank you in advance!