feat(data_library): add journald sample package - #294
Open
chelseawright7 wants to merge 1 commit into
Open
Conversation
Dylan-M
requested changes
Aug 13, 2026
Dylan-M
left a comment
Contributor
There was a problem hiding this comment.
Please remove the process scraper. PRs should be for a single feature/capability. The JournalD work looks pretty good, but cannot be co-merged with the process work.
Adds data_library/journald/journal_json.log, 16 `journalctl -o json` records across the syslog, stdout, journal, kernel and driver transports: sshd auth success/failure/lockout, nginx worker exit and upstream refusal, systemd unit failure, sudo (authorized and NOT-in-sudoers), a UFW block, an OOM kill, cron, dockerd, postgres, and journald rate-limit suppression. Fields use raw journald names (_PID, _EXE, MESSAGE, PRIORITY, SYSLOG_IDENTIFIER, _HOSTNAME) rather than OpenTelemetry-conventional ones, which is what the OTel journald receiver actually delivers. journald's canonical timestamp __REALTIME_TIMESTAMP is epoch microseconds and has no ctime directive, so those values are static; syslog-transport records also carry SYSLOG_TIMESTAMP, which does use a directive and advances per emission. Both noted in the filegen docs.
chelseawright7
force-pushed
the
feat/process-metrics-and-journald-samples
branch
from
August 13, 2026 12:51
ff9428d to
1ba9426
Compare
2 tasks
Dylan-M
requested changes
Aug 13, 2026
| @@ -0,0 +1,16 @@ | |||
| {"__REALTIME_TIMESTAMP":"1783087320123456","__MONOTONIC_TIMESTAMP":"884512300","_BOOT_ID":"8f3c2a1b4d5e6f708192a3b4c5d6e7f8","_MACHINE_ID":"a1b2c3d4e5f60718293a4b5c6d7e8f90","_HOSTNAME":"linux-host01.test","_TRANSPORT":"syslog","SYSLOG_FACILITY":"4","SYSLOG_IDENTIFIER":"sshd","SYSLOG_TIMESTAMP":"%b %d %H:%M:%S","PRIORITY":"6","_UID":"0","_GID":"0","_COMM":"sshd","_EXE":"/usr/sbin/sshd","_CMDLINE":"sshd: deploy [priv]","_PID":"1842","_SYSTEMD_UNIT":"ssh.service","_SYSTEMD_CGROUP":"/system.slice/ssh.service","MESSAGE":"Accepted publickey for deploy from 10.0.4.12 port 51322 ssh2: ED25519 SHA256:abcd1234"} | |||
Contributor
There was a problem hiding this comment.
__REALTIME_TIMESTAMP is hardcoded to fixed epoch-microsecond values. It doesn't advance per emission the way the ctime directives everywhere else in the library do. The journald receiver keys record time off this field, so every run replays the same 2026 timestamps. Once the %EPOCH_US directive lands (see #296), I'd use it here so this renders live epoch microseconds. The other 15 lines need the same change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Change
Adds
data_library/journald/journal_json.log— 16journalctl -o jsonrecords across thesyslog,stdout,journal,kernelanddrivertransports: sshd auth success/failure/lockout, nginx worker exit and upstream refusal, systemd unit failure, sudo (authorized and NOT-in-sudoers), a UFW block, an OOM kill, cron, dockerd, postgres, and journald rate-limit suppression.Journald had no Blitz coverage at all before this.
Fields use raw journald names (
_PID,_EXE,MESSAGE,PRIORITY,SYSLOG_IDENTIFIER,_HOSTNAME) rather than OpenTelemetry-conventional ones, which is what the OTeljournaldreceiver actually delivers — and what makes the sample useful to a pipeline whose job is renaming them.One limitation, documented in
docs/generator/filegen.md: journald's canonical timestamp__REALTIME_TIMESTAMPis epoch microseconds, which has no ctime directive, so those values are static. Syslog-transport records also carrySYSLOG_TIMESTAMP, which does use a directive and advances per emission.Checklist
go build ./...,go test ./...,make lintandmake securitypass, as doesgo build/go testunder-tags embed_library.Smoke-tested through the CLI:
blitz --generator-type filegen --generator-filegen-source package:journald \ --output-type stdout --generator-count 3Confirms the package resolves by name and that
SYSLOG_TIMESTAMPdirective substitution advances per emission.Per review: the hostmetrics
processscraper that was originally in this PR has been split out into #295. This PR is now journald only.