<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Good idea!<br>
<br>
But...that doesn't address how to have a size/date retention that's specific to that entry.<br>
<br>
But the trickiest issue is how to have specific audit types (again, namely syslog 'authpriv') have the same kind of namespace assignment. This would be like what you would filter via '-t' or '--identifier'.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
This is expressly the kind of logging information that has express retention requirements. But we wouldn't want to have the same retention requirements apply to all other logging information, primarily due to the extremely large storage requirements that might
entangle.</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Lukáš Nykrýn <lnykryn@redhat.com><br>
<b>Sent:</b> Monday, August 12, 2024 3:17 AM<br>
<b>To:</b> SCOTT FIELDS <Scott.Fields@kyndryl.com><br>
<b>Cc:</b> systemd-devel@lists.freedesktop.org <systemd-devel@lists.freedesktop.org><br>
<b>Subject:</b> [EXTERNAL] Re: [systemd-devel] journal: question regarding retention options by priority/identifier/unit</font>
<div> </div>
</div>
<style>
<!--
#x_pfptBannerwlebv1p
{display:block!important;
visibility:visible!important;
opacity:1!important;
background-color:#D0D8DC!important;
max-width:none!important;
max-height:none!important}
-->
</style>
<div>
<div style="display:none!important; display:none; visibility:hidden; font-size:1px; color:#ffffff; line-height:1px; height:0px; max-height:0px; opacity:0; overflow:hidden">
Hello! I only briefly tested this, but I believe you can use journal namespaces. I tweaked the Service stanza in systemd-journald-audit. socket to "systemd-journald@ audit. service" restarted everything and now I have audit messages separated</div>
<div style="display:none!important; display:none; visibility:hidden; font-size:1px; color:#ffffff; line-height:1px; height:0px; max-height:0px; opacity:0; overflow:hidden">
</div>
<div dir="ltr">Hello!
<div><br>
</div>
<div>I only briefly tested this, but I believe you can use journal namespaces.</div>
<div>I tweaked the Service stanza in systemd-journald-audit.socket to "systemd-journald@audit.service" restarted everything and now I have audit messages separated in /var/log/journal/4339da6539564b07a62c1604525309ff.audit</div>
<div>And since the instance can have separate configuration file (/etc/systemd/journald@audit.conf) you could set a different retention policy there. Check the journald.conf manpage.</div>
<div><br>
</div>
<div>Lukas</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">ne 11. 8. 2024 v 23:52 odesílatel SCOTT FIELDS <<a href="mailto:Scott.Fields@kyndryl.com">Scott.Fields@kyndryl.com</a>> napsal:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div class="x_msg-8691266963922581920">
<div dir="ltr">
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
In the syslogd configuration, you can arrange to have specific retention factors for a given class of information.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
AKA, I can have all kernel messages go to a specific file and that file can have a retention/rotation specified by size or date</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
For example, I can ensure I have 90 days of data for 'authpriv' level syslog data, if audit requires it. And that data would ONLY include 'authpriv' level data.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I don't see any options in journald to limit the scope for 'system' journal data, when configured to be persistent.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Are there any configuration options (or options in plan for the future) that will allow me to split this level of data into different managed storage with its own retention polices, much like how syslogd currently allows?</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
The long term goal in this case is to deprecate syslogd for audit record retention (among other uses).</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div id="x_m_5159486646128130663Signature">
<p><span style="color:black">Scott Fields</span></p>
<p><span style="color:black">Kyndryl</span></p>
<p><span style="color:black">Senior Lead SRE – BNSF</span></p>
<p><span style="color:black">817-593-5038 (BNSF)</span></p>
<p><span style="color:black"><a href="mailto:scott.fields@kyndryl.com" target="_blank" style="margin-top:0px; margin-bottom:0px">scott.fields@kyndryl.com</a></span></p>
<p><a href="mailto:scott.fields@bnsf.com" target="_blank" style="margin-top:0px; margin-bottom:0px">scott.fields@bnsf.com</a></p>
<p> </p>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</body>
</html>