#StackBounty: #server #systemd #systemd-journald Avoid systemd unit (service) to be logged in journal

Bounty: 50

To produce metrics on some disks I have setup a systemd.timer + systemd.service

That timer spins up every 10 seconds, and I would like to avoid my journal be spammed every time this small script get spawned and then succedes.

Journal writes multiple lines like that

Jan 04 17:21:31 hostname systemd[1]: personal.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit personal.service has successfully entered the 'dead' state.

Moreover there is an audit on every service start

Jan 04 17:22:31 hostname audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=personal comm="systemd" exe="/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jan 04 17:22:31 hostname kernel: audit: type=1131 audit(1578158551.035:11612): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=personal comm="systemd" exe="/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.