daily pastebin goal
22%
SHARE
TWEET

grok for syslog

a guest May 30th, 2014 192 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.        if [type] == "auth_log" {
  2.             grok {
  3.                  break_on_match => false
  4.                  match => [
  5.                        "message", "%{SYSLOGBASE} New session %{INT:session_id} of user %{USERNAME:username}.",
  6.                        "message", "%{SYSLOGBASE} Invalid user %{USERNAME:username} from %{IP:src_ip}",
  7.                        "message", "%{SYSLOGBASE} Accepted publickey for %{USERNAME:username} from %{IP:src_ip}",
  8.                        "message", "%{SYSLOGBASE} Connection closed by %{IP:src_ip} \[preauth\]",
  9.                        "message", "%{SYSLOGBASE} reverse mapping checking getaddrinfo for %{HOSTNAME:remote_host} \[%{IP:src_ip}\] failed - POSSIBLE BREAK-IN ATTEMPT!",
  10.                        "message", "%{SYSLOGPAMSESSION}",
  11.                        "message", "%{SYSLOGLINE}"
  12.                         ]
  13.                  add_field => { "syslog_raw" => "%{message}"}
  14.                  overwrite => [ "message" ]
  15.                  add_field => { "received_at" => "%{@timestamp}" }
  16.             }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top