Created
September 8, 2013 17:39
-
-
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.
This file contains 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 { | |
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