From f6f93d855ea71681a6e9c097d7b3eee43fd38070 Mon Sep 17 00:00:00 2001 From: unkin-agent Date: Tue, 17 Nov 2026 21:45:03 +1100 Subject: [PATCH] Collect kernel audit records in journald (#579) EL drops systemd-journald-audit.socket from journald's Sockets=, so kernel audit records never reach the journal or the victorialogs upload. journald only picks up listen fds at start, so the drop-in needs a restart to apply. - add a systemd-journald drop-in listing the audit socket when journald upload is enabled - remove the drop-in when upload is disabled - restart journald on drop-in add or removal via the drop-in notifying the service puppet-systemd already manages Reviewed-on: https://git.unkin.net/unkin/puppet-prod/pulls/579 Co-authored-by: unkin-agent Co-committed-by: unkin-agent --- modules/victorialogs/manifests/client/journald.pp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/victorialogs/manifests/client/journald.pp b/modules/victorialogs/manifests/client/journald.pp index 2a6e13c..9988eb5 100644 --- a/modules/victorialogs/manifests/client/journald.pp +++ b/modules/victorialogs/manifests/client/journald.pp @@ -52,11 +52,21 @@ class victorialogs::client::journald ( enable => true, subscribe => File['/etc/systemd/journal-upload.conf.d/victorialogs.conf'], } + + # EL drops the audit socket from journald's Sockets=; journald only takes listen fds at start + systemd::dropin_file { 'audit.conf': + unit => 'systemd-journald.service', + content => "[Service]\nSockets=systemd-journald-audit.socket\n", + } }else{ file {'/etc/systemd/journal-upload.conf.d/victorialogs.conf': ensure => absent, } + systemd::dropin_file { 'audit.conf': + ensure => absent, + unit => 'systemd-journald.service', + } } }