I have configuration the rsyslog module with parameter 'if', but not function.
How to create rule this exemple:
$template tplremote3,"%timegenerated% %HOSTNAME% %fromhost-ip% %syslogtag%%msg:::drop-last-lf%\n"
$template RemoteHost3,"/var/log/%HOSTNAME%-secure.log"
if $syslogfacility-text == 'authpriv' then ?RemoteHost3;tplremote3
& ~
$template tplremote4,"%timegenerated% %HOSTNAME% %fromhost-ip% %syslogtag%%msg:::drop-last-lf%\n"
$template RemoteHost4,"/var/log/%HOSTNAME%-audit.log"
if $syslogfacility-text == 'local2' then ?RemoteHost4;tplremote4
Hi Dear,
I have configuration the rsyslog module with parameter 'if', but not function.
How to create rule this exemple: $template tplremote3,"%timegenerated% %HOSTNAME% %fromhost-ip% %syslogtag%%msg:::drop-last-lf%\n" $template RemoteHost3,"/var/log/%HOSTNAME%-secure.log" if $syslogfacility-text == 'authpriv' then ?RemoteHost3;tplremote3 & ~ $template tplremote4,"%timegenerated% %HOSTNAME% %fromhost-ip% %syslogtag%%msg:::drop-last-lf%\n" $template RemoteHost4,"/var/log/%HOSTNAME%-audit.log" if $syslogfacility-text == 'local2' then ?RemoteHost4;tplremote4
Thanks!