feat: where a host's logs go beyond it (4.31.0) #95

Merged
christianmanivong merged 2 commits from feat/log-forwarding-2053 into main 2026-11-06 10:14:20 +00:00
Owner

For NetOrk/netork#2053: the read by column of netOrk's log lists.

get_log_sources() now also returns forwarding, read in the same command (no extra round trip):

  • rsyslog: whether rsyslogd runs.
  • rules: its forwarding rules.
    • Both syntaxes are read: legacy @/@@/:omrelp: with & and property filters, and RainerScript action(type="omfwd"|"omrelp") inside if … then and ruleset(…) { … }.
    • Each rule carries protocol, target, port, selector and ruleset.
    • A rule is complete only for *.*/*.debug with no condition around it.
  • file_inputs: its imfile inputs (input(type="imfile"), $InputFileName), with their ruleset.
  • journal: whether the journal reaches rsyslog.
    • True through imjournal.
    • Through imuxsock it depends on journald's ForwardToSyslog: the last setting across journald.conf and its drop-ins, else the default the distribution ships commented out. None when nothing says.

The rsyslog configuration is printed with each line behind | , so no line of it can read as a report section. parse_log_forwarding and parse_rsyslog are public. Version 4.31.0.

Tests: 1407 passed, ruff, mypy. A live run on an Ubuntu host found Ubuntu's own ForwardToSyslog=yes drop-in in /usr/lib/systemd/journald.conf.d/.

For NetOrk/netork#2053: the *read by* column of netOrk's log lists. `get_log_sources()` now also returns `forwarding`, read in the same command (no extra round trip): - `rsyslog`: whether rsyslogd runs. - `rules`: its forwarding rules. - Both syntaxes are read: legacy `@`/`@@`/`:omrelp:` with `&` and property filters, and RainerScript `action(type="omfwd"|"omrelp")` inside `if … then` and `ruleset(…) { … }`. - Each rule carries protocol, target, port, selector and ruleset. - A rule is `complete` only for `*.*`/`*.debug` with no condition around it. - `file_inputs`: its `imfile` inputs (`input(type="imfile")`, `$InputFileName`), with their ruleset. - `journal`: whether the journal reaches rsyslog. - True through `imjournal`. - Through `imuxsock` it depends on journald's `ForwardToSyslog`: the last setting across `journald.conf` and its drop-ins, else the default the distribution ships commented out. None when nothing says. The rsyslog configuration is printed with each line behind `| `, so no line of it can read as a report section. `parse_log_forwarding` and `parse_rsyslog` are public. Version 4.31.0. Tests: 1407 passed, ruff, mypy. A live run on an Ubuntu host found Ubuntu's own `ForwardToSyslog=yes` drop-in in `/usr/lib/systemd/journald.conf.d/`.
christianmanivong added 1 commit 2026-11-06 10:06:16 +00:00
feat: where a host's logs go beyond it (4.31.0)
driver / lint (pull_request) Successful in 16s
driver / standard (pull_request) Failing after 17s
driver / types (pull_request) Successful in 1m8s
driver / test (3.13) (pull_request) Successful in 1m4s
driver / test (3.12) (pull_request) Successful in 1m15s
driver / lowest (pull_request) Successful in 38s
driver / build (pull_request) Successful in 30s
driver / security (pull_request) Successful in 1m2s
CI / driver (pull_request) Failing after 2m23s
driver / publish (pull_request) Skipped
8557710724
get_log_sources() reads, in the same command, whether rsyslog runs, its
forwarding rules (legacy @/@@/:omrelp: and RainerScript omfwd/omrelp,
with selector, ruleset and whether they take every message), its imfile
inputs, and whether the journal reaches it (imjournal, or imuxsock with
journald's ForwardToSyslog; failing a setting, the default the
distribution ships commented out). Returned as `forwarding`;
parse_log_forwarding and parse_rsyslog are public (NetOrk/netork#2053).
christianmanivong added 1 commit 2026-11-06 10:10:58 +00:00
refactor: the rsyslog reader's cutter and action in their own steps
driver / standard (pull_request) Successful in 15s
driver / lint (pull_request) Successful in 13s
driver / types (pull_request) Successful in 53s
driver / test (3.12) (pull_request) Successful in 1m7s
driver / test (3.13) (pull_request) Successful in 1m2s
driver / lowest (pull_request) Successful in 37s
driver / build (pull_request) Successful in 26s
driver / security (pull_request) Successful in 56s
CI / driver (pull_request) Successful in 2m31s
driver / publish (pull_request) Skipped
b685b200cc
Keeps _pieces and _Reader.call within the standard's complexity limit.
christianmanivong merged commit 252ea3b81c into main 2026-11-06 10:14:20 +00:00
christianmanivong deleted branch feat/log-forwarding-2053 2026-11-06 10:14:20 +00:00
Sign in to join this conversation.