Skip to content

Instantly share code, notes, and snippets.

@andrewrlee
Created September 8, 2013 17:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save andrewrlee/6486801 to your computer and use it in GitHub Desktop.
Save andrewrlee/6486801 to your computer and use it in GitHub Desktop.
Example logstash format for parsing dropwizard logback format style logging. This parses the remainder of a message that starts with _data_ as json.
input {
stdin { }
file {
type => "applogs"
# Wildcards work, here :)
path => [ "/home/alee/workspaces/java-workspaces/elasticsearch-example/graph-presenter/logs/*.log" ]
}
}
filter{
grok{
match => ["message", "%{WORD:level} %{SYSLOG5424SD:time} %{JAVACLASS:class}: _data_%{GREEDYDATA:json}"]
}
json {
source => "json"
}
}
output { stdout { codec => rubydebug } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment