Created
May 16, 2014 22:02
-
-
Save GaryRogers/3e1d672a132a27b68ccd to your computer and use it in GitHub Desktop.
Monolog Logstash Config example
This file contains hidden or 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 { codec => "plain" } | |
} | |
filter { | |
# Pulls out fields from monolog text log. (Note, we don't send extra to our monolog) | |
grok { | |
match => [ "message", "%{MONOLOG} %{GREEDYDATA:mymessage}"] | |
} | |
json { | |
source => "context" | |
} | |
} | |
output { | |
stdout { codec => rubydebug } | |
} |
You need to add overwrite => [ "message" ]
to set properly the message
field.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(Monolog pattern):
Or inline:
Log input example:
Event output exemple: