On Wed, 4 Apr 2012, Jo Rhett wrote:
It doesn't appear that you can put forwarding server information in a template.
Am I overlooking something? Short of sending a patch to enable this, are there
any good ways to do this?
What I want to do is:
$template MyTemplate,"unique %FROMHOST% %MSG%"
$template SyslogHost,"@@hostname:514;MyTemplate"
local0.* ?SyslogHost
This is to replace a syslog-ng implementation which has a syntax that does this:
destination SyslogHost { tcp("hostname" port(514) template("unique $HOST
$MSGONLY\n")); };
the templates are used for either the message itself, or the local
filename to write to, not for other uses
so you would do
local0.* @@hostname;MyTemplate
to send via TCP to hostname using the message format in MyTemplate
the ? action is used for if you want to write to different file names
based on the contents of the message.
David Lang
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/