Skip to content

Instantly share code, notes, and snippets.

@ntakouris
Created June 30, 2017 12:55
Show Gist options
  • Save ntakouris/cf59de4a35ca3b5aa6f89ba806f1fb4e to your computer and use it in GitHub Desktop.
Save ntakouris/cf59de4a35ca3b5aa6f89ba806f1fb4e to your computer and use it in GitHub Desktop.
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