<div dir="ltr">My thought: If Steve is able to help you fix the behavior, then great. Otherwise, pivot.<div><br></div><div>Instead of using the space_left_action in auditd, use logrotate and have it check for max log size. Put your script in the postrotate section if more logic than what is provided with logrotate is needed. </div><div><br></div><div>Stephen<br><br><div class="gmail_quote"><div dir="ltr">On Thu, Jan 26, 2017 at 2:41 PM Bond Masuda <<a href="mailto:bond.masuda@jlbond.com">bond.masuda@jlbond.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Steve for the suggestion. Unfortunately, even with my script<br class="gmail_msg">
sending USR2 to auditd, i still get the same behavior where the<br class="gmail_msg">
space_left_action=exec call to the script only happens once.<br class="gmail_msg">
<br class="gmail_msg">
Thoughts?<br class="gmail_msg">
Bond<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
On 01/25/2017 10:22 PM, Steve Grubb wrote:<br class="gmail_msg">
> Hello,<br class="gmail_msg">
><br class="gmail_msg">
> On Wed, 25 Jan 2017 15:06:50 -0800<br class="gmail_msg">
> Bond Masuda <<a href="mailto:bond.masuda@jlbond.com" class="gmail_msg" target="_blank">bond.masuda@jlbond.com</a>> wrote:<br class="gmail_msg">
>> I configured space_left and space_left_action to run a script that<br class="gmail_msg">
>> compresses and moves older audit log files from /var/log/audit. It<br class="gmail_msg">
>> appears to work 1 time, and then doesn't work anymore until I kill<br class="gmail_msg">
>> the auditd daemon and start it again.<br class="gmail_msg">
>><br class="gmail_msg">
>> Is this expected and/or desired behavior? I didn't see anything in<br class="gmail_msg">
>> the man pages about this behavior. I was hoping to have my script run<br class="gmail_msg">
>> every time the space_left threshold is hit so as to not run out of<br class="gmail_msg">
>> logging disk space. Is there something I can do to accomplish this?<br class="gmail_msg">
> You may need to send SIGUSR2 to `pidof auditd` to reset the internal<br class="gmail_msg">
> counters. Let me know if that does not fix it.<br class="gmail_msg">
><br class="gmail_msg">
> -Steve<br class="gmail_msg">
<br class="gmail_msg">
--<br class="gmail_msg">
Linux-audit mailing list<br class="gmail_msg">
<a href="mailto:Linux-audit@redhat.com" class="gmail_msg" target="_blank">Linux-audit@redhat.com</a><br class="gmail_msg">
<a href="https://www.redhat.com/mailman/listinfo/linux-audit" rel="noreferrer" class="gmail_msg" target="_blank">https://www.redhat.com/mailman/listinfo/linux-audit</a><br class="gmail_msg">
</blockquote></div></div></div>