-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Hi,
I'm using rhel 7.6 and running rsyslogd 8.24.0-52.el7 and audit-2.8.4-4.el7. Every time the audit daemon rotates it logs (internal to auditd not logrotate configuration) we get imfile-state files that remain on the file system indefinitely and I suspect are losing any messages that are still to be sent from the rotated audit log. Here is an example of this happening:-
[root@testing:/var/spool/rsyslog]#ls -ltr /var/spool/rsyslog/imfile-state:1* |tail -4
-rw-------. 1 root root 112 Oct 28 11:28 /var/spool/rsyslog/imfile-state:18:4369a2957393e7b1
-rw-------. 1 root root 112 Oct 28 11:31 /var/spool/rsyslog/imfile-state:19:ae91f8feb5b52fa5
-rw-------. 1 root root 100 Oct 28 11:34 /var/spool/rsyslog/imfile-state:13:ea1ccbfb3c71e85d
-rw-------. 1 root root 112 Oct 28 11:34 /var/spool/rsyslog/imfile-state:12:2edd93420c1c7d70
[root@testing:/var/spool/rsyslog]#ls -ltr /var/log/audit/ |tail -5
-r--------. 1 root root 104857836 Oct 28 11:25 audit.log.4
-r--------. 1 root root 104857634 Oct 28 11:28 audit.log.3
-r--------. 1 root root 104857626 Oct 28 11:31 audit.log.2
-r--------. 1 root root 104857696 Oct 28 11:34 audit.log.1
-rw-------. 1 root root 92821855 Oct 28 11:37 audit.log
I've read some similar bugs like
https://bugzilla.redhat.com/show_bug.cgi?id=1763746
https://bugzilla.redhat.com/show_bug.cgi?id=1744682
Originally I was using the legacy way of doing this with an audit.conf in rsyslog.d as follows..
$ModLoad imfile
$InputFileName /var/log/audit/audit.log
$InputFileTag audispd:
$InputFileStateFile audit_log
$InputFileSeverity info
$InputFileFacility local6
$InputRunFileMonitor
$WorkDirectory /var/spool/rsyslog # default location for work (spool) files
But having read some other bugs and docs I've tried to move to the following configuration..
audit logs to arcsight
module(load="imfile" mode="inotify")
input(type="imfile"
File="/var/log/audit/audit.log"
Tag="audispd:"
Severity="info"
Facility="local6"
deleteStateOnFileDelete="on")
But no luck.. Whatever I've tried I always get the same imfile-states in the rsyslog working directory. On some of our busy audit systems the log files rotate every few minutes and we end up with tens of thousands of state files.
I do not see this issue on our rhel7.3 boxes that run rsyslogd 7.4.7 and have the legacy "$ModLoad imfile" configuration mentioned above.
Hopefully there is enough information to get this investigated but if there is anything else I need to provide please let me know.
Regards