Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
logstash for magento exception
input {
file {
type => "magento-exception"
path => "/path/to/magento/www/var/log/exception.log"
codec => multiline {
pattern => "^%{TIMESTAMP_ISO8601}"
negate => true
what => previous
}
}
}
filter {
if [type] == "magento-exception" {
mutate {
gsub => ["message", "\n", " "]
}
grok {
match => [ "message", "%{TIMESTAMP_ISO8601:date} %{GREEDYDATA:exception} Stack trace: %{GREEDYDATA:stack_trace}" ]
}
}
}
output {
elasticsearch {
protocol => "http"
host => "localhost"
port => 9200
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.