Created
July 10, 2018 08:56
-
-
Save itskenny0/5b313109d123b534a01b297b7054c098 to your computer and use it in GitHub Desktop.
communigate password fail geoip logstash config
This file contains 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 { | |
beats { | |
port => 50441 | |
ssl => false | |
} | |
} | |
filter { | |
if "communigate-log" in [tags] { | |
grok { | |
match => [ "message", "%{INT} (SMTPI|IMAP)-%{INT}\(\[%{IP:ip}\]?.+\) failed to open ACCOUNT\(%{DATA:account}\) %{DATA} Error Code=%{GREEDYDATA:errorcode}" ] | |
add_tag => ["auth-fail-smtp"] | |
} | |
geoip { | |
source => "ip" | |
target => "geoip" | |
add_field => [ "[geoip][coordinates]", "%{[geoip][longitude]}" ] | |
add_field => [ "[geoip][coordinates]", "%{[geoip][latitude]}" ] | |
} | |
mutate { | |
convert => [ "[geoip][coordinates]", "float"] | |
} | |
} | |
grok { | |
match => [ "message", "%{MONTH:month} %{MONTHDAY:day} %{TIME:time} %{HOSTNAME:hostname} %{DATA} Failed password for %{WORD:username} from %{IP:ip}" ] | |
add_tag => ["auth-fail-ssh"] | |
} | |
} | |
output { | |
elasticsearch { | |
hosts => ["localhost:9200"] | |
index => "n8gs-tz-%{+YYYY.MM.dd}" | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment