I think the message comes from systemd itself, so changing the log settings of the service doesn’t help.
Don’t know whether this can be configured in systemd.
Thanks for the response. It is indeed a systemd ‘issue’, however, this one seems difficult to tackle without affecting other systemd logging.
I will keep on searching for a good way to disable systemd logging for a specific service, but sofar I did not find a solution. If anybody has a brilliant idea here ??
Depending on your syslog setup, you could configure your syslog daemon to ignore the messages in question for the syslog output.
To filter the journald messages try to add a drop-in and restrict the log level. Run systemctl edit check_mk@.service. An editor will open. Enter
[Service]
LogLevelMax=err
and save the file (don’t change its name; the default name is perfectly valid).
Then run
systemctl daemon-reload
to activate the changes.
In case you are unfamiliar with drop-ins: If systemd finds a unit file, say /etc/systemd/system/foo.serviceand a directory /etc/systemd/system/foo.service.d/ exists, then all *.conf files in that specific subdirectory are added to the orginal unit file.
This way you can tweak the behaviour of systemd units without editing the original file (as that would be overwritten by an update of the application).
See here for details on the LogLevelMax setting and here for drop-ins.
I’m not sure if the syslog filtering is even neccessary once the journald filtering is in effect. Just try the journald filtering first.
I have attempted your suggestions (focused on systemd for now), however adding either ‘LogLevelMax’ into a drop-in, or directly in the service definition file, does not stop the messages being logged.
Changes were followed by ‘systemctl daemon-reload’ and a restart of the ‘check_mk.socket’.
During my attempts I have kept ‘journalctl -f’ open to see the effects.
Interestingly increasing the LogLevelMax to ‘debug’ also does not make a difference, while I would expect more chatty messages.
I have also attempted to add this into the socket file (isof the .service’ file), also without results.
Also using ‘Sysloglevel’ does not make a difference.
This is really an interesting issue to keep systemd from logging these messages…
Dec 22 11:13:57 wise systemd[1]: Starting Check_MK (127.0.0.1:56796)…
Dec 22 11:14:01 wise systemd[1]: Started Check_MK (127.0.0.1:56796).
yes, I tried it just out. Same behaviour as you describe. Apparently the
[Service]
LogLevelMax=err
setting only applies to messages emitted by check_mk@.service itself.
The started and stopped messages appear to be emitted by systemd which isn’t affected by the settings in the check_mk@.service file.