About
Linux auditd records logins, authentication,sudo commands, and changes to watched files in /var/log/audit/audit.log. sshd, sudo, PAM, and systemd-logind write auth messages to the systemd journal (the same messages /var/log/auth.log or /var/log/secure hold). A Fluent Bit or OpenTelemetry Collector agent on each host reads both, parses the key fields, and pushes them to Sazabi over OTLP/HTTPS.
Two limits to know:
- Each audit line is its own record. Multi-line events (
SYSCALL,EXECVE,PATH) share anaudit_serialbut are not joined. sudocommand lines inUSER_CMDrecords stay hex-encoded in thecmdattribute, as auditd writes them.
Prerequisites
- auditd installed (
apt-get install auditdordnf install audit) and systemd-journald on each host. - Fluent Bit v3.1 or later, or the OpenTelemetry Collector Contrib distribution installed on the host. The Collector’s
journaldreceiver runsjournalctl, which the upstream container image does not include. - The collector runs as root, or as a user in the
systemd-journalgroup that can read the audit log. - Your Sazabi intake URL, shown on the log source setup screen.
Set up in the dashboard
1
Create the log source
Open Settings > Log sources, add Linux auditd, and keep the setup screen open. The configs on that screen already contain your intake host.2
Add audit rules
PAM records logins, authentication, andsudo commands with no extra rules. Add these rules to watch account, sudoers, and SSH config files and to record commands run as root by a logged-in user:/etc/audit/rules.d/sazabi.rules
sudo augenrules --load and check with sudo auditctl -l. If the host already ships a rule set, add only the rules it lacks.3
Install the collector config
Copy the Fluent Bit or OpenTelemetry Collector config from the setup screen. Both tail/var/log/audit/audit.log and split each line into the record type, timestamp, serial, and key=value fields, including the quoted msg='…' payload. Both read journald entries with SYSLOG_FACILITY 4 (auth) and 10 (authpriv), and drop kernel audit copies so records are not sent twice.- Fluent Bit: save it as
/etc/fluent-bit/fluent-bit.yaml, create/var/lib/fluent-bit, and start Fluent Bit with-c /etc/fluent-bit/fluent-bit.yaml. - OpenTelemetry Collector: save it as
/etc/otelcol-contrib/config.yamland create/var/lib/otelcol/storage.
/var/log/auth.log (Debian, Ubuntu) or /var/log/secure (RHEL family).4
Restart and generate events
Restart the collector (sudo systemctl restart fluent-bit or sudo systemctl restart otelcol-contrib), then SSH into the host and run sudo true.Set up with the CLI
You can also register the Linux auditd log source with the Sazabi CLI (installed and authenticated — see CLI reference). Registering the source mints the same intake URL the dashboard shows above (the public key is embedded in its hostname):sazabi log-sources setup-instructions with the new log source’s ID to print the audit rules and collector configs with the intake host filled in.
Verify
Open the Intake page and filter by serviceauditd or linux-auth. Expect USER_LOGIN, USER_AUTH, and USER_CMD audit records and sshd and sudo auth messages within a minute. You can also ask the agent: “Which users ran sudo on my hosts in the last hour?”
Troubleshooting
- Permission denied on the audit log or journal: run the collector as root, or grant the groups above.
- No auth messages:
journalctl SYSLOG_FACILITY=10 -n 5returns nothing when the host logs auth only to files; use the file tail. journalctlnot found: install the Collector Contrib package on the host instead of running the container image.- TLS or DNS errors: allow outbound HTTPS on port 443 to your intake host.
Further reading
auditd rules
Syntax for audit watch and syscall rules.
Fluent Bit systemd input
Journal matches and options for the auth stream.
Intake
Confirm records arriving from each log source.