-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PE-4076: Rsyslog and logrotate changes (#225)
* rsyslog logrotate installation * config update * conf changes * log duplicate issue fix and file permission and ownership fix * rsyslog conf in providers and adm group not in opensuse fix * group change
- Loading branch information
Showing
4 changed files
with
38 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/var/log/stylus-audit.log { | ||
yearly | ||
rotate 2 | ||
missingok | ||
notifempty | ||
compress | ||
delaycompress | ||
dateext | ||
dateformat -%m-%Y | ||
size 100M | ||
create 600 root root | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Running rsyslog as root. | ||
# TODO: should this be done or change acceptance criteria to about audit log file permissions accordingly | ||
$PrivDropToUser root | ||
# default config has $Umask 0022 set. That breaks any config related to masks and modes. | ||
$Umask 0000 | ||
|
||
# Mesage format as per rfc5424. | ||
$template ForwardFormat,"<%pri%>1 %timestamp:::date-rfc3339% %HOSTNAME% %syslogtag% %procid% - - %msg%\n" | ||
|
||
# route messages with facility local7 and severity notice to /var/log/stylus-audit.log | ||
if ($syslogfacility-text == 'local7' and $syslogseverity-text == 'notice') then{ | ||
action( | ||
type="omfile" | ||
file="/var/log/stylus-audit.log" | ||
FileCreateMode="0600" | ||
fileowner="root" | ||
template="ForwardFormat" | ||
) & stop | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters