Skip to content

Commit

Permalink
Merge pull request #296 from fbird/master
Browse files Browse the repository at this point in the history
remove the unnecessary grep regex, and also the mutate filter.
  • Loading branch information
calvin1978 committed Nov 12, 2013
2 parents 493f08b + 2ef384e commit f0d697b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions support/logstash/error_collector/shipper.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,8 @@ input {
}

filter {
if [type] != "showcase" or [message] !~ /(ERROR)|(^.+Exception: .+)|(^\s+at .+)|(^\?s+... \d+ more)|(^\s*Caused by:.+)/{
drop {} # 将非错误日志过滤掉
}

mutate {
replace => [ "message", "[%{host}]-%{message}" ] # 将产生日志的host记录在日志记录中
if [type] != "showcase" or [message] !~ /(ERROR)|(^.+Exception: .+)/{
drop {} # 将非错误日志过滤掉,因为之前已经将stacktrace拼接成一条记录,所以这里的过滤条件也比较简单,不需要复杂的正则表达式,只要带Error或者Exception就可以了
}
}

Expand Down

0 comments on commit f0d697b

Please sign in to comment.