【发布时间】:2015-05-01 14:38:12
【问题描述】:
我正在尝试解析这种日志格式:
http://localhost:8080/,200,OK,11382,date=Mon 27 Apr 2015 12:56:33 GMT;newheader=foo;connection=close;content-type=text/html;charset=ISO-8859-1;server=Apache-Coyote/1.1;
使用这个配置文件:
input {
stdin{}
}
filter {
grok {
match => [ "message" , "%{URI:uriaccessed},%{NUMBER:httpcode},%{WORD:httpcodeverb},%{NUMBER:bytes},date=%{TIMESTAMP_ISO8601:logtimestamp};%{GREEDYDATA:msg}"]
}
mutate{
convert => ["httpcode","integer"]
convert => ["bytes","integer"]
}
date {
locale => "en"
match => [ "logtimestamp" , "EEE dd MMM yyy HH:mm:ss" ] #Mon 27 Apr 2015 12:56:33 GMT
}
}
output {
stdout { codec => rubydebug }
}
但是,我遇到了 grok prase 失败,我不确定问题是什么。 似乎无法确定导致问题的模式。 任何想法/cmets 将不胜感激。
【问题讨论】: