Capture specific word from message


I need to create a field with the username from the message. How can i capture the username from a message and put it in a separate field?

Feb 20 15:23:33 localhost sshd[24958]: Failed password for invalid user admin from port 13246 ssh2

I need to capture the username which failed to login and put it in a new field.

How about this?

grok { match => { "message" => "invalid user %{WORD:user}" } }

thanks. that worked

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.