【发布时间】:2016-11-11 07:07:46
【问题描述】:
例如这里是我的日志文件
[2016-10-18 12:05:53.228] log example
[2016-10-18 11:55:53.228] 19249060-91df-11e6-be68-753fa0e2c729 logg example
[2016-10-18 11:35:53.228] 19249060-91ff-11e6-be68-753fa0e2c729 loggg example /api/userbasic/userinfo?requestedUserId=19249060-91df-11e6-be68-753fa0e2c729
我的日志的grok过滤器。这里我使用了多种模式
filter {
grok {
match => [
"message","\[%{TIMESTAMP_ISO8601:timestamp1}\] %{WORDS_EX:msg}",
"message","\[%{TIMESTAMP_ISO8601:timestamp2}\] %{UUID:user_id1} %{WORDS_EX:msg2} %{URIPATHPARAM:path}",
"message","\[%{TIMESTAMP_ISO8601:timestamp3}\] %{UUID:user_id2} %{WORDS_EX:msg3}"
]
}
}
现在我想将日志索引到具有不同类型(架构)的弹性搜索中,例如 logstash/type1, logstash/type2, logstash/type3,
任何帮助表示赞赏!
【问题讨论】: