Common Configuration Mistakes and Misunderstandings¶
This section documents syntax patterns that are often misunderstood, invalid, or misused in rsyslog configurations — especially when transitioning from legacy syntax to modern RainerScript.
It is intended to help both human users and automated tools avoid common traps when writing or validating rsyslog configuration files.
Incorrect Syntax |
Legacy Meaning |
Why It’s Invalid or Misleading |
Correct Form (RainerScript) |
---|---|---|---|
|
Shorthand: same selector + stop message processing |
Only valid in legacy syntax. |
Use: if <condition> then {
action(...)
stop
}
|
|
Mistaken as a function call |
Not a function; stop is a bare statement in RainerScript |
Just use |
|
Discard message with same selector |
Legacy shorthand only. |
Use: if <condition> then {
stop
}
|
|
Assumes “stop” is an action module |
There is no such module. |
Use bare |
|
Combines multiple errors: function call and syntax mismatch |
Parentheses are invalid, and |
Use |
Note
These mistakes are common in AI-generated configs or user translations from legacy examples. Always validate your configuration with:
rsyslogd -N1
Support: rsyslog Assistant | GitHub Discussions | GitHub Issues: rsyslog source project
Contributing: Source & docs: rsyslog source project
© 2008–2025 Rainer Gerhards and others. Licensed under the Apache License 2.0.