Skip to contentSkip to conversation

rotating audit logs

DISCUSSION Bill Tangren 2 participants 4 messages Feb 13, 2007

lore
Share & tools
lore
#0 lore raw

I am required to rotate the audit logs daily on my RHEL boxes. As far as I can tell from the auditd.conf file, the auditd daemon only rotates the files when max_log_file reaches a certain size.

Is is possible to have the auditd daemon rotate the logs according to time, rather than size?

If auditd cannot do this, is it possible to turn off log rotating and let the logrotate daemon do it?

Thanks,

Bill Tangren

#1 lore raw
Quoted 2 lines · Bill Tangren

Is is possible to have the auditd daemon rotate the logs according to time, rather than size?

There is a log rotation script suitable for cron usage in the audit package. You just simply need to add it to your cron setup.

Quoted 2 lines

If auditd cannot do this, is it possible to turn off log rotating and let the logrotate daemon do it?

You could do that too, but you'll have to teach logrotate about the audit logs.

-Steve

#2 lore raw
Quoted 5 lines · Steve Grubb
Quoted 2 lines · Bill Tangren

Is is possible to have the auditd daemon rotate the logs according to time, rather than size?

There is a log rotation script suitable for cron usage in the audit package. You just simply need to add it to your cron setup.

OK, I've found the auditd.cron file. How do I prevent auditd from rotating by size? Set the maximum size too high to be reached in a day?

Quoted 5 lines
Quoted 3 lines

If auditd cannot do this, is it possible to turn off log rotating and let the logrotate daemon do it?

You could do that too, but you'll have to teach logrotate about the audit logs.

I've taught logrotate about other logs, so I don't see that as a problem. How to tell auditd not to rotate, though, that I DON'T know how to do.

Quoted 3 lines

-Steve

#3 lore raw
Quoted 1 line · Bill Tangren

How do I prevent auditd from rotating by size?

Set max_log_file_action=ignore

Quoted 1 line

Set the maximum size too high to be reached in a day?

No, there are 2 controls, the file size and what to do when its reached. In this case you don't care about the size, but you care about what it does.

-Steve