我正在尝试使用 Elastic Stack 解析 Minecraft 日志,但遇到了一个非常奇怪的问题(对我来说可能很奇怪!)
我的日志的所有行都被正确解析,但我_grokparsefailure在每个行中都有标签。
我的logstash管道配置是这样的:
input {
file {
path => [ "/path/to/my/log" ]
#start_position => "beginning"
tags => ["minecraft"]
}
}
filter {
if "minecraft" in [tags] {
# mutate {
# gsub => [
# "message", "\\n", ""
# ]
# }
#############################
# Num 1 #
#############################
grok {
match => [ "message", "\[%{TIME:timestamp}] \[(?<originator>[^\/]+)?/%{LOGLEVEL:level}]: %{GREEDYDATA:message}" ]
overwrite => [ "message" ]
break_on_match => false
}
#############################
# Num 2 #
############################# …Run Code Online (Sandbox Code Playgroud)