Skip to content

Instantly share code, notes, and snippets.

@amacgregor
Forked from GuillaumeDievart/elk-magento-exception
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amacgregor/2cfb3be47f2cd9c181f1 to your computer and use it in GitHub Desktop.
Save amacgregor/2cfb3be47f2cd9c181f1 to your computer and use it in GitHub Desktop.
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