Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove the unnecessary grep regex, and also the mutate filter. #296

Merged
merged 1 commit into from
Nov 12, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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