feat(log-forwarding): each forwarding rule names its template #116

Merged
christianmanivong merged 2 commits from feat/forward-rule-template into main 2026-11-12 22:42:45 +00:00
Owner

ForwardRuleDict gains template: the template a forwarding rule sends its messages in.

  • the rule's own: *.* @host:514;RSYSLOG_SyslogProtocol23Format, action(type="omfwd" ... template="...")
  • else the default set before it: $ActionForwardDefaultTemplate for legacy rules, module(load="builtin:omfwd" template="...") for omfwd actions
  • else None: rsyslog's default, RFC 3164, the host's local time without a zone

netOrk's Graylog integration judges each poll's forwarding reading against Graylog's host and port (NetOrk/netork, Graylog poll hook) and needs this to keep flagging rules whose timestamps Graylog files shifted by the host's UTC offset (NetOrk/netork#493).

Tests: tests/test_log_forwarding.py (four new cases, the full-rule assertion now includes template); the whole suite passes.

`ForwardRuleDict` gains `template`: the template a forwarding rule sends its messages in. - the rule's own: `*.* @host:514;RSYSLOG_SyslogProtocol23Format`, `action(type="omfwd" ... template="...")` - else the default set before it: `$ActionForwardDefaultTemplate` for legacy rules, `module(load="builtin:omfwd" template="...")` for omfwd actions - else None: rsyslog's default, RFC 3164, the host's local time without a zone netOrk's Graylog integration judges each poll's forwarding reading against Graylog's host and port (NetOrk/netork, Graylog poll hook) and needs this to keep flagging rules whose timestamps Graylog files shifted by the host's UTC offset (NetOrk/netork#493). Tests: `tests/test_log_forwarding.py` (four new cases, the full-rule assertion now includes `template`); the whole suite passes.
christianmanivong added 1 commit 2026-11-12 22:36:46 +00:00
feat(log-forwarding): each forwarding rule names its template
driver / lint (pull_request) Successful in 16s
driver / standard (pull_request) Failing after 17s
driver / types (pull_request) Successful in 1m9s
driver / test (3.13) (pull_request) Successful in 1m15s
driver / test (3.12) (pull_request) Successful in 1m30s
driver / lowest (pull_request) Successful in 40s
driver / build (pull_request) Successful in 32s
driver / security (pull_request) Successful in 1m5s
CI / driver (pull_request) Failing after 2m38s
driver / publish (pull_request) Skipped
8e43fe2ed9
A rule's template decides the timestamp it sends: rsyslog's default, RFC 3164,
carries the host's local time without a zone, which a collector such as Graylog
files shifted by the host's UTC offset (NetOrk/netork#493). The rule now says
which template it uses: its own (`@host;Name`, `action(... template="...")`),
else the default set before it (`$ActionForwardDefaultTemplate`, or
`module(load="builtin:omfwd" template="...")` for omfwd actions), else None.
christianmanivong added 1 commit 2026-11-12 22:38:29 +00:00
refactor(log-forwarding): a legacy rule's template is read on its own
driver / standard (pull_request) Successful in 17s
driver / lint (pull_request) Successful in 14s
driver / types (pull_request) Successful in 58s
driver / test (3.12) (pull_request) Successful in 1m21s
driver / test (3.13) (pull_request) Successful in 1m8s
driver / lowest (pull_request) Successful in 40s
driver / build (pull_request) Successful in 29s
driver / security (pull_request) Successful in 1m4s
CI / driver (pull_request) Successful in 2m57s
driver / publish (pull_request) Skipped
46d7125aa6
The quality ratchet holds _Reader.legacy at complexity 10.
christianmanivong merged commit 8673d1eda1 into main 2026-11-12 22:42:45 +00:00
christianmanivong deleted branch feat/forward-rule-template 2026-11-12 22:42:45 +00:00
Sign in to join this conversation.