diff options
Diffstat (limited to 'doc/rainerscript.html')
-rw-r--r-- | doc/rainerscript.html | 51 |
1 files changed, 44 insertions, 7 deletions
diff --git a/doc/rainerscript.html b/doc/rainerscript.html index b83184d..b42f79d 100644 --- a/doc/rainerscript.html +++ b/doc/rainerscript.html @@ -44,6 +44,45 @@ C programming language or PHP. <p>If in doubt how to properly escape, use the <a href="http://www.rsyslog.com/rainerscript-constant-string-escaper/">RainerScript String Escape Online Tool</a>. +<h2>Variable (Property) types</h2> +<p>All rsyslog properties (see the <a href="property_replacer.html">property +replacer</a> page for a list) can be used in RainerScript. In addition, it also +supports local variables. Local variables are local to the current message, but are +NOT message properties (e.g. the "$!" all JSON property does not contain +them). +<p>Only message json (CEE/Lumberjack) properties can be modified by +the "set" and "unset" statements, not any other message property. Obviously, +local variables are also modifieable. +<p>Message JSON property names start with "$!" where the bang character +represents the root. +<p>Local variables names start with "$.", where the dot denotes the root. +<p>Both JSON properties as well as local variables may contain an arbitrary +deep path before the final element. The bang character is always used as path +separator, no matter if it is a message property or a local variable. For example +"$!path1!path2!varname" is a three-level deep message property where as +the very similar looking "$.path1!path2!varname" specifies a three-level +deep local variable. +The bang or dot character immediately following the +dollar sign is used by rsyslog to separate the different types. +<h2>configuration objects</h2> +<h3>main_queue()</h3> +<p><i>This object is available since 7.5.3.</i> +This permits to specify parameters for the main message queue. Note that +only <a href="queue_parameters.html">queue-parameters</a> are permitted for this +config object. This permits to set the same options like in ruleset and action +queues. A special statement is needed for the main queue, because it is a +different object and cannot be configured via any other object. +<p>Note that when the main_queue() object is configured, the legacy +$MainMsgQ... statements are ignored. +<p>Example:</p> +<textarea rows="2" cols="60">main_queue(queue.size="100000" queue.type="LinkedList") +</textarea> +<h3>action()</h3> +The <a href="rsyslog_conf_actions.html">action</a> object is the primary +means of describing actions to be carried out. +<h3>global()</h3> +<p>This is used to set global configuration parameters. For details, please +see the <a href="global.html">rsyslog global configuration object</a>. <h2>Expressions</h2> The language supports arbitrary complex expressions. All usual operators are supported. The precedence of operations is as follows @@ -61,13 +100,6 @@ of a and b should be tested as "a <> b". The "not" operator should be reserved to cases where it actually is needed to form a complex boolean expression. In those cases, parenthesis are highly recommended. -<h2>configuration objects</h2> -<h3>action()</h3> -The <a href="rsyslog_conf_actions.html">action</a> object is the primary -means of describing actions to be carried out. -<h3>global()</h3> -<p>This is used to set global configuration parameters. For details, please -see the <a href="global.html">rsyslog global configuration object</a>. <h2>Lookup Tables</h2> <p><a href="lookup_tables.html">Lookup tables</a> are a powerful construct to obtain "class" information based on message content (e.g. to build @@ -110,6 +142,11 @@ equivalent single-character [field($msg, 44 ,3)] extraction. <li>prifilt(constant) - mimics a traditional PRI-based filter (like "*.*" or "mail.info"). The traditional filter string must be given as a <b>constant string</b>. Dynamic string evaluation is not permitted (for performance reasons). +<li>exec_template(templateName) -- executes a template and returns the string generated +by it. Note that templateName must be a constant string. This is primarily for performance +reasons. If there is a valid use case for dynamic template names, please let us know +and we will re-consider the decision. TemplateName can be any template name, including the +predefined ones. </ul> <p>The following example can be used to build a dynamic filter based on some environment variable: |