Hello

I have 26 templates of the form
$template DynFileAuth,"/data/syslog/%HOSTNAME%/%$YEAR%%$MONTH%%$DAY%/auth.log" $template DynFileSyslog,"/data/syslog/%HOSTNAME%/%$YEAR%%$MONTH%%$DAY%/syslog" which will log to my data partition.Now I had a problem with the data partition and the local log
went to to this data partition.
What I want to do is seperate local logs from remote logs i.e. something like

if $fromhost == 'xxx' then {
$template DynFileAuth,"/gugus/syslog/%HOSTNAME%/%$YEAR%%$MONTH%%$DAY%/auth.log" $template DynFileSyslog,"/gugus/syslog/%HOSTNAME%/%$YEAR%%$MONTH%%$DAY%/syslog"
   ...
}
else {
$template DynFileAuth,"/data/syslog/%HOSTNAME%/%$YEAR%%$MONTH%%$DAY%/auth.log" $template DynFileSyslog,"/data/syslog/%HOSTNAME%/%$YEAR%%$MONTH%%$DAY%/syslog"
...
}

or even better define a head of path for each case as a property like
if $fromhost == 'xxx' then
  HEAD="/gugus"
else
  HEAD="/data"

$template DynFileAuth,"/%HEAD%/syslog/%HOSTNAME%/%$YEAR%%$MONTH%%$DAY%/auth.log" $template DynFileSyslog,"/%HEAD%/syslog/%HOSTNAME%/%$YEAR%%$MONTH%%$DAY%/syslog"

How can I do that?

Greetings and thanks for the nice syslog relplacement!!

Beat

_______________________________________________
rsyslog mailing list
http://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