configuration objects
RainerScript configuration objects define inputs, actions, modules, templates, rulesets, and other rsyslog configuration elements. Object parameters are case-insensitive, and objects are closed by their final parenthesis.
Note
Configuration object parameters are case-insensitive.
Common Parameters
config.enabled
Added in version 8.33.0.
All configuration objects have a config.enabled parameter.
For auto-generated configs, it is useful to have the ability to disable some
config constructs even though they may be specified inside the config. This
can be done via the config.enabled parameter.
If set to on or not specified, the construct will be
used, if set to any other value, it will be ignored.
This can be used together with the backtick functionality to enable or
disable parts of the configuration from either a file or environment variable.
Example:
Let’s say we want to conditionally load a module. Environment variable
LOAD_IMPTCP will be either unset or off .
Then we can use this config construct:
module(load="imptcp"
config.enabled=`echo $LOAD_IMPTCP`)
If the variable is set to off, the module will not be loaded.
Statement Terminators
Configuration objects without body blocks are complete when their closing
parenthesis is reached. Objects with body blocks, such as ruleset() and
list-type template(), are complete at their closing curly brace }.
Do not add a semicolon after object statements such as action(),
module(), input(), template(), or ruleset():
action(type="omfile" file="/var/log/messages") # correct
action(type="omfile" file="/var/log/messages"); # invalid
Semicolons are used by expression-style RainerScript statements where they are
documented, for example set, reset, unset, and
call_indirect. Legacy selector and action syntax also has semicolon
meanings of its own; those legacy uses do not make ; a universal
RainerScript statement terminator.
Objects
action()
The action object is the primary means of describing actions to be carried out.
global()
This is used to set global configuration parameters. For details, please see the rsyslog global configuration object.
input()
The input object is the primary means of describing inputs, which are used to gather messages for rsyslog processing.
module()
The module object is used to load plugins.
parser()
The parser object is used to define custom parser objects.
timezone()
The timezone object is used to define timezone settings.
include()
The include object is use to include configuration snippets stored elsewhere into the configuration.
ratelimit()
The ratelimit object is used to define named rate limit policies.
Support: rsyslog Assistant | GitHub Discussions | GitHub Issues: rsyslog source project
Contributing: Source & docs: rsyslog source project
© 2008–2026 Rainer Gerhards and others. Licensed under the Apache License 2.0.