Hi! This seems like it should be a simple question but I'm having trouble finding relevant documentation, so I appreciate any advice y'all might have.
I'm trying to write filters to handle OpenSSH log data, and I'd like to map it all to ECS.
The problem, I think, shows up immediately: Each SSH log even has a different event.category
and event.type
.
Given grok patterns like:
SSHD_SUCCESS (?<sshd.result>Accepted) %{WORD:sshd.auth_type} for %{USERNAME:[client][user][name]} from %{IP:[client][ip]} port %{NUMBER:[client][port]} %{WORD:sshd.protocol}: %{GREEDYDATA:sshd.cipher}
...
SSHD_NORMAL_LOG %{SSHD_SUCCESS}|%{SSHD_OTHER}|%{SSHD_MORE}
SSHD_LOG %{SSHD_NORMAL_LOG}|%{SSHD_OTHER_CATEGORY}|%{SSHD_ETC}
How do I ensure that an event that matched SSHD_SUCCESS
gets identified as authentication
& start
?
The only solution I can see is to write filters that specifically match on %{SSHD_SUCCESS}
instead of %{SSHD_LOG}
, and then set categorization fields and the like that way, but this seems like a lot of trouble.