Created
July 10, 2012 08:21
-
-
Save juanje/3081998 to your computer and use it in GitHub Desktop.
A simple Logstash conffile with a custom grok filter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
tcp { | |
type => "linux-syslog" | |
port => 3333 | |
} | |
file { | |
type => "linux-syslog" | |
path => [ "/var/log/auth.log" ] | |
} | |
} | |
filter { | |
grok { | |
type => "linux-syslog" | |
pattern => "%{SYSLOGTIMESTAMP:timestamp} %{HOSTNAME:host_target} sshd\[%{BASE10NUM}\]: Failed password for (invalid user |)%{USERNAME:username} from %{IP:src_ip} port %{BASE10NUM:port} ssh2" | |
add_tag => "ssh_brute_force_attack" | |
} | |
} | |
output { | |
stdout { } | |
elasticsearch { embedded => true } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks dude I used your example to create some more: