Here's what I use:
$umask 0000
$DirGroup logs
$DirOwner root
$template TraditionalFormat,"%timegenerated% %HOSTNAME% %syslogtag%%msg%\n"
$template
DynaFile,"/var/log/CHPC/%timegenerated:1:4:date-rfc3339%.%timegenerated:6:7:date-rfc3339%.%timegenerated:9:10:date-rfc3339%/%HOSTNAME%/messages"
$DirCreateMode 0755
*.* -?DynaFile;TraditionalFormat
I didn't spend anytime trying to re-route localhost someplace. Plus I
have this in /etc/cron.daily:
compresslogs.sh:
#!/bin/bash
/usr/bin/find /var/log/CHPC ! -name "*gz" -type f ! -path "*`/bin/date
+%Y.%m.%d`*" -exec gzip -9 -f '{}' \;
HTH,
Steve Harper
carlopmart wrote:
carlopmart wrote:
Hi all,
Somebody can helps me with rsyslog configuration to use it as a log
centralized server?? I am trying several configs without luck, and
all examples that I found are related to v3 and nothing about v2 that
ships with CentOS or RHEL.
I am trying to do something like this:
$template DynFile,"/var/log/rsyslog/%HOSTNAME%/secure"
if $source != 'localhost' and $syslogfacility-text == 'authpriv'
then -?DynFile
But this is for version 3 ... and doesn't works ... Any help??
And how can I rotate logs received from remote hosts??
please, any hints about this?
_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list