0
由Logstash解析的我的日誌事件以Loggly四次結束。什麼可能導致這個?由Logstash解析的日誌事件以Loggly四次結束
一個例子是,該行:
2014-11-05 01:52:55,485 PM PST [localhost-startStop-1] INFO o.s.web.context.ContextLoader - Root WebApplicationContext: initialization started
看起來這在Loggly:
我Logstash配置文件看起來像:
input {
file {
type => "advcore-error"
path => [ "/var/company/tomcat/logs/error/advcore-error.log"]
sincedb_path => "$HOME/.sincedb"
}
}
filter {
if [type] == "advcore-error" {
grok {
pattern => "%{DATE_US} %{TIME},%{DATA:offset} %{DATA:meridian} %{DATA:timezone} \[%{DATA:thread}\] %{LOGLEVEL:loglevel} %{GREEDYDATA:message}"
add_tag => "advcore-error"
}
}
}
output {
loggly {
codec => "plain"
host => "logs-01.loggly.com"
key => "<my-secret-key>"
proto => "http"
workers => 1
}
}
與您的問題無關,但請確保您使用'日期'過濾器正確分析'@ timestamp'字段中的事件時間戳。 – 2014-11-06 07:24:59