Skip to content

Instantly share code, notes, and snippets.

@PhaedrusTheGreek
Last active October 21, 2016 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PhaedrusTheGreek/d14360f0d3f7aad016850c5de36f9ba5 to your computer and use it in GitHub Desktop.
Save PhaedrusTheGreek/d14360f0d3f7aad016850c5de36f9ba5 to your computer and use it in GitHub Desktop.
input {
stdin {}
}
filter {
grok {
match => [ "message", "\[%{TIMESTAMP_ISO8601:timestamp}\]\[%{DATA:loglevel}\]\[%{DATA:logtype}\] \[%{DATA:node}\] \[%{DATA:index}\]\[%{DATA:shard}\] took\[%{DATA:took}\], took_millis\[%{NUMBER:took_millis:int}\], types\[%{DATA:types}\], stats\[%{DATA:stats}\], search_type\[%{DATA:search_type}\], total_shards\[%{NUMBER:total_shards:int}\], source\[%{DATA:source_query}\], extra_source\[%{DATA:extra_source}\],"]
}
date {
match => [ "timestamp", "ISO8601" ]
remove_field => "timestamp"
}
}
output {
elasticsearch {
index => "logstash-slowlog"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment