Logstashdate错了吗?

我正在使用以下configurationparsingNginx日志到logstash中:

input { stdin { type => "nginx"}} filter { grok { type => nginx pattern => "%{COMBINEDAPACHELOG}" } date { type => nginx match => [ "timestamp", "dd/MMM/YYYY:HH:mm:ss Z" ] } } output { stdout { debug => true debug_format => "ruby"}} 

除了这个问题:当我传递一个@timestamp为“04 / Sep / 2012:12:44:16 -0500”的@timestamp ,我得到(结果时间戳)“2013-09-04T17:44:16.000Z ”。 错了一年。 这是一个错误?

从链接到logstash文档的文档中,您已经在datefilter中select了错误的语法。 尝试使用YYYY(年)而不是YYYY(年代),我认为应该纠正你所报告的问题。

我希望有帮助!