exec_template()

Purpose

exec_template(str)

Sets a variable through the execution of a template. Basically this permits to easily extract some part of a property and use it later as any other variable.

Read more about it here : http://www.rsyslog.com/how-to-use-set-variable-and-exec_template

Example

The following example shows the template being used to extract a part of the message.

template(name="extract" type="string" string="%msg:F:5%")
set $!xyz = exec_template("extract");

Support: rsyslog Assistant | GitHub Discussions | GitHub Issues: rsyslog source project

Contributing: Source & docs: rsyslog source project

© 2008–2025 Rainer Gerhards and others. Licensed under the Apache License 2.0.