Skip to content

Conversation

@SamC-STFC
Copy link

The rsyslog module previously could not use conditional filters for every type of action, this change updates the templates and the schema to add a new condition field to the generic rsyslog action template. Whatever is put in the condition field will be inserted as the condition of an if block surrounding the action, which is generated using the existing action template.
This means that the condition field can now be added to any action.

This should not cause any backwards incompatibility, since the existing action template is still used to generate the action itself.

Example configuration

dict(
  'fwd',
  dict(
    'condition', "<condition>",
    ...
    )
)

Example output

if <condition> then {
  action(
    ...
  )
}

The rsyslog module previously could not use conditional filters for
every type of action, this change updates the templates and the schema
to add a new "condition" field to the generic rsyslog action template.
Whatever is put in the condition field will be inserted as the condition
of an if block surrounding the action, which is generated using the
existing action template.

This means that the "condition" field can now be added to any action.
@jrha jrha added this to the 26.1 milestone Jan 14, 2026
@SamC-STFC SamC-STFC marked this pull request as ready for review January 19, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants