i am try to play with rsyslog configuration. To my knowledge

To enable log rotation: we should do something below:

$outchannel log_rotation,/var/log/syslog.log, 1048576 ,/usr/bin/rotate.sh
*.* :omfile:$log_rotation 
And to tabulate syslog with a template : we should do something like this:

$template CSVData, "%timereported:::date-rfc3339%,\
                    %hostname%,\
                    %syslogfacility-text%,\
                    %syslogpriority-text%,\
                    %app-name:::csv%,\
                    %msg:::drop-last-lf,csv%\n"
  
 *.* /var/log/syslog.log;CSVData
May i know how to combine these two together? My intention is to tabulate a
syslog with my template and have it rotate when the log is exceed 1MB.

At first i thought of

$outchannel log_rotation,/var/log/syslog.log;CSVData, 1048576
,/usr/bin/rotate.sh
*.* :omfile:$log_rotation 
But it not working, it just generate file known as syslog.log;CSVData



--
Sent from: http://rsyslog-users.1305293.n2.nabble.com/
_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to