From e4ca8a3119ece504819605b340a3f5ba36b3eab6 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 3 Nov 2009 09:20:02 +0100 Subject: added function getenv() to RainerScript --- doc/expression.html | 21 +++++++++++++-------- doc/rainerscript.html | 18 +++++++++++++++--- 2 files changed, 28 insertions(+), 11 deletions(-) (limited to 'doc') diff --git a/doc/expression.html b/doc/expression.html index 9e37cb7a..c401d9ab 100644 --- a/doc/expression.html +++ b/doc/expression.html @@ -1,17 +1,22 @@ -Expressions + +Expressions in rsyslog -back -

Expressions

+back to rsyslog filter conditions +

Expressions in rsyslog

Rsyslog supports expressions at a growing number of places. So -far, they are supported for filtering messages.

Expression support is provided by RainerScript. For now, please see the formal expression definition in RainerScript ABNF. It is the "expr" node.

C-like comments (/* some comment */) are supported inside the expression, but not yet in the rest of the configuration file.

[rsyslog.conf overview] +far, they are supported for filtering messages.

+

Expression support is provided by RainerScript. Please see the +RainerScript documentation for more details.

+

C-like comments (/* some comment */) are supported inside the expression, +but not yet in the rest of the configuration file.

+ +

[rsyslog.conf overview] [manual index] [rsyslog site]

This documentation is part of the -rsyslog -project.
-Copyright © 2008 by Rainer -Gerhards and +rsyslog project.
+Copyright © 2008, 2009 by Rainer Gerhards and Adiscon. Released under the GNU GPL version 3 or higher.

diff --git a/doc/rainerscript.html b/doc/rainerscript.html index ef0e41cb..63a79040 100644 --- a/doc/rainerscript.html +++ b/doc/rainerscript.html @@ -51,13 +51,25 @@ 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. +

Functions

+

RainerScript supports a currently quite limited set of functions: +

+

The following example can be used to build a dynamic filter based on some environment +variable: +

+if $msg contains getenv('TRIGGERVAR') then /path/to/errfile
+

[rsyslog.conf overview] [manual index] [rsyslog site]

This documentation is part of the rsyslog project.
-Copyright © 2008 by Rainer -Gerhards and +Copyright © 2008, 2009 by Rainer Gerhards and Adiscon. Released under the GNU GPL version 3 or higher.

- \ No newline at end of file + -- cgit