journalctl -u ssh
prints all records associated with the ssh unit. But how can I get all records not associated with the ssh unit? Things that don't work: journalctl -u '!ssh'
; journalctl '!_SYSTEMD_UNIT=ssh'
; journalctl '_SYSTEMD_UNIT!=ssh'
. Documentation doesn't suggest that this is possible, but I'm still hopeful. ;-)
grep -v sshd
? Or more refined,grep -v "$(hostname) sshd\["
.journalctl -f | awk '$5 !~ /sshd\[[0-9]+\]:/ { print }'
.journalctl -o json
... now if you have logs from the log ingestion you got an infinite loop.