简体   繁体   English

LogStash日期过滤器错误

[英]LogStash date filter error

I've just upgraded from 5.2 to 5.6 in my test environment. 我刚刚在测试环境中从5.2升级到5.6。

After the upgrade my logstash filter for date stopped working. 升级后,我的logstash过滤器的日期停止了工作。

I'm getting a date of "Sep 26 11:01:41" and matching on 我得到的日期是"Sep 26 11:01:41"并且匹配

"match => [ "syslog_timestamp", "MMM dd HH:mm:ss" ]"

it throws 它抛出

JSON parse error, original data now in message field {:error=>#<LogStash::Json::ParserError: Unrecognized token 'Sep': was expecting ('true', 'false' or 'null')

You have one too many spaces in your pattern "MMM dd HH:mm:ss" should be "MMM dd HH:mm:ss" 模式"MMM dd HH:mm:ss"空格过多,应为"MMM dd HH:mm:ss"

"match => [ "syslog_timestamp", "MMM dd HH:mm:ss" ]"
                                    ^
                                    |
                                   here

I have found an issue on your log 我在您的日志中发现了一个问题

  input {
     beats {
        port => 5044
       ssl => true
       ssl_certificate => "/etc/pki/tls/certs/logstash-forwarder.crt"
       ssl_key => "/etc/pki/tls/private/logstash-forwarder.key"
       codec => json
      }
}

try remove the 尝试删除

codec => json

seems the input data is not json format ,just remove it and try 似乎输入数据不是json格式,只需将其删除并尝试

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM