Created
June 30, 2017 12:55
-
-
Save ntakouris/cf59de4a35ca3b5aa6f89ba806f1fb4e to your computer and use it in GitHub Desktop.
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 { | |
beats{ | |
port => 5044 | |
} | |
} | |
filter{ | |
if[message] =~ "^#" { drop{} } | |
if[server] == "alkistis"{ | |
grok{ | |
match => ["message", "%{TIMESTAMP_ISO8601:log_timestamp} %{IPORHOST:site} %{WORD:method} %{URIPATH:pa$ | |
} | |
} | |
} | |
output { | |
stdout { codec => rubydebug } | |
elasticsearch { | |
hosts => ["localhost:9200"] | |
manage_template => false | |
if[server] == "alkistis"{ | |
index => "alkistis-%{+YYYY.MM.dd}" | |
document_type => "iis-log" | |
}else{ | |
index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}" | |
document_type => "%{[@metadata][type]}" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment