[rsyslog-notify] Forum Thread: Log to file into different san volumes - (Mode 'post')

noreply at adiscon.com noreply at adiscon.com
Tue Apr 8 16:37:58 CEST 2014


User: marme72 
Forumlink: http://kb.monitorware.com/viewtopic.php?p=24508#p24508

Message: 
----------
Hello,

I have two san volume on redhat (named kf01pk), how can I store logs into
different volumes based on the source address ? Right now server1 logs are
stored into /logserver1 volume, how can I store server2 logs into
/logserver2 volume ? 



this is my logtofile.conf file :

$template
DYNmessages,"/logserver1/%FROMHOST%/%$YEAR%/%$MONTH%/messages-%$DAY%-%FROMHOST%.log"

if \
        $source != 'kf01pk' \
then    ?DYNmessages
 


this my rsyslog.conf file :

$template TraditionalFileFormat,"%TIMESTAMP% %FROMHOST%
%syslogtag%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n"
#
$FileOwner root
$FileCreateMode 0640
$DirCreateMode 0755

# Include all config file in /etc/rsyslog.d
$IncludeConfig /etc/rsyslog.d/*.conf


More information about the rsyslog-notify mailing list