Skip to content

Instantly share code, notes, and snippets.

@GaryRogers
Created May 16, 2014 22:02
Show Gist options
  • Save GaryRogers/3e1d672a132a27b68ccd to your computer and use it in GitHub Desktop.
Save GaryRogers/3e1d672a132a27b68ccd to your computer and use it in GitHub Desktop.
Monolog Logstash Config example
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 }
}
@emxjay
Copy link

emxjay commented Nov 8, 2016

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