RainerScript — rsyslog 8.24.0 documentation

# RainerScript

RainerScript is a scripting language specifically designed and well-suited for processing network events and configuring event processors. It is the prime configuration language used for rsyslog. Please note that RainerScript may not be abreviated as rscript, because that’s somebody else’s trademark.

Some limited RainerScript support is available since rsyslog 3.12.0 (for expression support). In v5, “if .. then” statements are supported. The first full implementation is available since rsyslog v6.

- Data Types
- Expressions
- Functions
  - getenv(str)
  - strlen(str)
  - tolower(str)
  - cstr(expr)
  - cnum(expr)
  - wrap(str, wrapper_str)
  - wrap(str, wrapper_str, escaper_str)
  - replace(str, substr_to_replace, replace_with)
  - re_match(expr, re)
  - re_extract(expr, re, match, submatch, no-found)
  - field(str, delim, matchnbr)
  - prifilt(constant)
  - dyn_inc(bucket_name_litteral_string, str)
  - lookup(table_name_litteral_string, key)
- Control Structures
  - if
  - if/else-if/else
  - foreach
  - call
  - continue
- configuration objects
  - action()
  - global()
  - input()
  - module()
  - parser()
  - timezone()
- Constant Strings
- Variable (Property) types
  - set
  - unset
  - reset
- Lookup Tables
- General Queue Parameters
- The rsyslog “call” statement
  - syntax
  - related links
- The rsyslog “call_indirect” statement
  - syntax
  - examples
  - additional information
- global() configuration object