Skip to content

Instantly share code, notes, and snippets.

@ddikman
Last active June 19, 2018 16:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ddikman/2935135e95c258b01f2e to your computer and use it in GitHub Desktop.
Save ddikman/2935135e95c258b01f2e to your computer and use it in GitHub Desktop.
Example of a filebeat to logstash to elasticsearch config
input {
beats {
port => 9300
type => beats
}
}
filter {
grok {
match => { "message" => "%{TOMCAT_DATESTAMP:DATETIME} \[%{WORD:level}\]%{SPACE}%{GREEDYDATA:message}" }
overwrite => [ "message" ]
}
date {
match => [ "DATETIME", "yyyy-MM-dd HH:mm:ss.SSS Z" ]
}
}
output {
elasticsearch {
hosts => ["search-xxxxx.eu-west-1.es.amazonaws.com:80"]
index => "um-server-%{+YYYY.MM.dd}"
}
stdout { codec => "json" }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment