Unsure how to approach rsyslog logging format -
Actually, I want to show my log in the format / var / log / 2014-03-01 / 192.168 .3.2_SW0002 where 192.168.3.2_SW0002 is a file automatically generated by rsyslog.
$ template router log file, "/ etc / logs / ** 2014-03-01 ** /% from host-IP% _% HOSTNAME%" Currently I have a cron job setup to create a folder with name = current date, except I do not know that to specify the intermediate folder before the automatically generated IP address and hostname How to use rsyslog
$ template routerLogFile, "/ etc / logs /% timegenerated ::: date-strftime (% Y-% m-% d)% /% from thehost-ip% _% HOSTNAME%" I was the first to have created a new logfile to get every message
Any thoughts? Optional Solution - I have written a script that is written in the /etc/rsyslog.conf file on a daily basis.
$ template router log file, "/ var / log / 2015/02/05 / router /% to host-IP% _% HOSTNAME% \ n" The Date field was updated in the Rsyslog.conf file.
Comments
Post a Comment