Forked from GuillaumeDievart/elk-magento-exception
Last active
August 29, 2015 14:13
-
-
Save amacgregor/2cfb3be47f2cd9c181f1 to your computer and use it in GitHub Desktop.
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 { | |
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