saz / puppet-rsyslog

Manage rsyslog through puppet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How does ' if scope.lookupvar ' ?

Tomelin opened this issue · comments

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!

Hi,

That it.
log_filters => [{
'expression' => "programname == 'foo'",
'action' => '/var/log/teste'
}
],

thanks