File: rs-exec_template.rst

package info (click to toggle)
rsyslog-doc 8.2302.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,464 kB
  • sloc: python: 178; makefile: 8
file content (25 lines) | stat: -rw-r--r-- 576 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
***************
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.

.. code-block:: none

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