You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @yaco16 and maintainers — really nice write-up, the rtk discover usage data makes the case very clear.
I'd like to take a shot at this. Based on CONTRIBUTING.md's TOML-vs-Rust decision criteria, journalctl looks like a good fit for a TOML filter (line-oriented text, regex stripping should hit the 60-80% target, no flag injection or structured parsing needed).
A couple of design questions before I start, to make sure I align with the project's direction:
Scope of -f (follow mode): Since follow is essentially streaming/interactive, my plan is to not match it in the filter regex and let it pass through unchanged. Does that match your intent?
Rewrite pattern registration: I'd add a RtkRule entry in src/discover/rules.rs so the hook layer auto-rewrites journalctl ... → rtk journalctl ..., similar to how systemctl status is registered. Confirming that's the right approach for a TOML-only filter.
Real samples: If anyone has anonymized journalctl outputs from real workflows (especially the three patterns @yaco16 listed), that would help me calibrate the regex and snapshot tests beyond synthetic fixtures.
Happy to draft a PR once the direction is confirmed.
Feature request to add rtk journalctl wrapper for filtering systemd journal output, similar to existing process/command filters; well-scoped with usage data supporting demand.
Triaged automatically by wshm · This is an automated analysis, not a human review.
Another data point from a different workflow, in case it helps size the demand.
rtk discover on an infrastructure repo — 5 sessions, 1981 Bash commands over 30 days — lists journalctl at 19 invocations among the top unhandled commands.
Usage here is service diagnosis on a Proxmox host and its guests over SSH, so the shapes are mostly:
Agreed on leaving -f unmatched. In an agent context follow mode is nearly always a mistake anyway, and passing it through unchanged is the least surprising behavior.
rtk log already exists and reads stdin ("Filter and deduplicate log output"), so journalctl ... | rtk log is a usable workaround today. Worth checking whether the journalctl filter can delegate to that dedup logic rather than reimplementing it — journal output from a busy unit is very repetitive, and dedup may be a bigger win than per-line prefix stripping.
Happy to supply anonymized samples for the patterns above if that helps calibrate the regex.
Activity
xup6jammy commentedon May 11, 2026
Hi @yaco16 and maintainers — really nice write-up, the
rtk discoverusage data makes the case very clear.I'd like to take a shot at this. Based on CONTRIBUTING.md's TOML-vs-Rust decision criteria, journalctl looks like a good fit for a TOML filter (line-oriented text, regex stripping should hit the 60-80% target, no flag injection or structured parsing needed).
A couple of design questions before I start, to make sure I align with the project's direction:
Scope of
-f(follow mode): Since follow is essentially streaming/interactive, my plan is to not match it in the filter regex and let it pass through unchanged. Does that match your intent?Rewrite pattern registration: I'd add a
RtkRuleentry insrc/discover/rules.rsso the hook layer auto-rewritesjournalctl ...→rtk journalctl ..., similar to howsystemctl statusis registered. Confirming that's the right approach for a TOML-only filter.Real samples: If anyone has anonymized journalctl outputs from real workflows (especially the three patterns @yaco16 listed), that would help me calibrate the regex and snapshot tests beyond synthetic fixtures.
Happy to draft a PR once the direction is confirmed.
pszymkowiak commentedon May 27, 2026
🔍 Automated Triage
featuremediumSummary
Feature request to add rtk journalctl wrapper for filtering systemd journal output, similar to existing process/command filters; well-scoped with usage data supporting demand.
Triaged automatically by wshm · This is an automated analysis, not a human review.
yannicklescure commentedon Sep 13, 2026
Another data point from a different workflow, in case it helps size the demand.
rtk discoveron an infrastructure repo — 5 sessions, 1981 Bash commands over 30 days — listsjournalctlat 19 invocations among the top unhandled commands.Usage here is service diagnosis on a Proxmox host and its guests over SSH, so the shapes are mostly:
Two notes on the design questions:
-funmatched. In an agent context follow mode is nearly always a mistake anyway, and passing it through unchanged is the least surprising behavior.rtk logalready exists and reads stdin ("Filter and deduplicate log output"), sojournalctl ... | rtk logis a usable workaround today. Worth checking whether the journalctl filter can delegate to that dedup logic rather than reimplementing it — journal output from a busy unit is very repetitive, and dedup may be a bigger win than per-line prefix stripping.Happy to supply anonymized samples for the patterns above if that helps calibrate the regex.