I have been studying logging on Linux but I have come to a road-block that's got me stuck for the past few days. My goal is to forward logs from two raspberry pi 3's running OpenSUSE Tumbleweed (aarch64) to my laptop running Ubuntu 17.04. I'm using rsyslog to accomplish this which is using imjournal as the source because I want to store the logs in json format with all the extra metadata provided by the systemd-journal and play with that later.
The problem I am trying to address is a lack of _TRANSPORT=audit on my raspberry pi's. I recompiled systemd with audit support on one of my pi's thinking that would solve the problem, but it hasn't. I have also added audit=1 to the kernel command line on the pi's and rebooted them. My laptop supports the audit transport.
Here's the output of journalctl --version, sudo journalctl --field _TRANSPORT, and cat /proc/cmdline on my various systems.
laptop:
$ journalctl --version
systemd 232
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP
+LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS
+KMOD +IDN
$ sudo journalctl --field _TRANSPORT
syslog
stdout
journal
audit
driver
kernel
$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-4.10.0-33-generic.efi.signed
root=UUID=cf4dc10b-511a-4369-ad5c-637833244929 ro apparmor=1
security=apparmor
rpi1 (reconfigured systemd with audit support):
$ journalctl --version
systemd 234
+PAM +AUDIT +SELINUX -IMA +APPARMOR -SMACK +SYSVINIT +UTMP
+LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID -ELFUTILS
+KMOD -IDN2 -IDN default-hierarchy=hybrid
$ sudo journalctl --field _TRANSPORT
stdout
kernel
journal
syslog
driver
$ cat /proc/cmdline
BOOT_IMAGE=/boot/Image-4.4.83-5-default root=UUID=30bbe534-b90f-4de6-
a0e6-1e2b60088461 root=/dev/disk/by-id/mmc-ACLCD_0xd02f42e5-part2
disk=/dev/disk/by-id/mmc-ACLCD_0xd02f42e5 resume=/dev/disk/by-id/mmc-
ACLCD_0xd02f42e5-part3 quiet splash=silent plymouth.enable=0
swiotlb=512,force cma=384M console=ttyS0,115200n8 console=tty quiet
audit=1
rpi2 (with original systemd configured by the distro):
$ journalctl --version
systemd 234
+PAM -AUDIT +SELINUX -IMA +APPARMOR -SMACK +SYSVINIT +UTMP
+LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL+XZ +LZ4 +SECCOMP +BLKID -ELFUTILS
+KMOD -IDN2 -IDN default-hierarchy=hybrid
$ sudo journalctl --field _TRANSPORT
stdout
kernel
journal
syslog
driver
cat /proc/cmdline
BOOT_IMAGE=/boot/Image-4.4.83-5-default root=UUID=30bbe534-b90f-4de6-
a0e6-1e2b60088461 root=/dev/disk/by-id/mmc-ACLCD_0xcaf643ee-part2
disk=/dev/disk/by-id/mmc-ACLCD_0xcaf643ee resume=/dev/disk/by-id/mmc-
ACLCD_0xcaf643ee-part3 quiet splash=silent plymouth.enable=0
swiotlb=512,force cma=384M console=ttyS0,115200n8 console=tty quiet
audit=1
I'm not sure what I need to do to get the audit transport available for systemd-journald on my rpi's. I have the auditd.service and systemd-journald-audit.socket enabled and active on all my systems. If you need any other infos just let me know, thank you.