Created
January 8, 2015 18:43
-
-
Save GuillaumeDievart/32f7cc4d8863c5e13d5d to your computer and use it in GitHub Desktop.
logstash for magento exception
This file contains 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