[rsyslog-notify] Forum Thread: Change FileOwner for a special file only - (Mode 'post')
noreply at adiscon.com
noreply at adiscon.com
Fri Feb 27 16:30:11 CET 2015
User: raphaelk
Forumlink: http://kb.monitorware.com/viewtopic.php?p=25278#p25278
Message:
----------
Hi,
I use rsyslogd on ubuntu 14.04, this is my rsyslod version :
rsyslogd 7.4.4, compiled with:
FEATURE_REGEXP: Yes
FEATURE_LARGEFILE: No
GSSAPI Kerberos 5 support: Yes
FEATURE_DEBUG (debug build, slow code): No
32bit Atomic operations supported: Yes
64bit Atomic operations supported: Yes
Runtime Instrumentation (slow code): No
uuid support:
What I would like to achieve is quite simple :
write log from an app to a dedicated file. The file must be readable by a
special user / group.
This code below allow me to write to the raphael.log file every log that
contains "raphael" : this is OK
[code:6v3wd3l9]
if $msg contains 'raphael' then /var/log/raphael.log
[/code:6v3wd3l9]
BUT this code doesn t to the job :
[code:6v3wd3l9]
FileOwner "raphael"
if $msg contains 'raphael' then /var/log/raphael.log
[/code:6v3wd3l9]
I remove the file, restart rsyslog (service rsyslogd restart), add some log
with logger (logger -t test raphael)
The /var/log/raphael is created with with settings
-rw-r----- 1 syslog adm 167 févr. 27 16:25 /var/log/raphael.log
I try many thing but I have to confess that it is a bit the mess in my head
between old syslod way write rule, rainer script, and other action( ...)
function.
Many thx for your help !
More information about the rsyslog-notify
mailing list