[rsyslog-notify] Forum Thread: how to bind templates to an action - (Mode 'post')

noreply at adiscon.com noreply at adiscon.com
Mon Feb 3 18:56:27 CET 2014


User: building39 
Forumlink: http://kb.monitorware.com/viewtopic.php?p=24159#p24159

Message: 
----------
I have the following template and action:

template(name="audit"
         type="list") {
        constant(value="Syslog MSG is: '")
        property(name="msg")
        constant(value="', ")
        property(name="timereported" dateFormat="rfc3339"
caseConversion="lower")
        constant(value="\n")
        }

local0.* action(type="omtcp" target="logserver" port="10514");audit


The template is taken directly from an example on the
"rsyslog_conf_templates"
The action hast the name of the template appended after a semi-colon as
indicated "how-to-bind-a-template" page.

After restarting the rsyslog service, I see this in /var/log/syslog:

rsyslogd-2207: error during parsing file
/etc/rsyslog.d/60-mezeo_audit.conf, on or before line 12: invalid character
';' - is there an invalid escape sequence somewhere? [try <!-- m --><a
class="postlink"
href="http://www.rsyslog.com/e/2207">http://www.rsyslog.com/e/2207</a><!--
m --> ]
rsyslogd-2184: action 'audit' treated as ':omusrmsg:audit' - please change
syntax, 'audit' will not be supported in the future [try <!-- m --><a
class="postlink"
href="http://www.rsyslog.com/e/2184">http://www.rsyslog.com/e/2184</a><!--
m --> ]

I see log messages showing up on the logserver, but the template has not
been applied, so far as I can see - the string "Syslog MSG is:" does not
appear in any of the log messages.

If I change the action to look like:
local0.* action(type="omtcp" target="logserver" port="10514"
template="audit")

the errors in /var/log/syslog disappear, but still the template does not
appear to have been applied.

What might I be doing wrong?

Thanks,
Mike


More information about the rsyslog-notify mailing list