Logstash 日志存储中的日期筛选器因dateparsefailure而失败
我有以下日志存储输出。我想用timestamp字段的值更新@timestamp字段(并最终从输出中删除timestamp字段)。我正在使用日期过滤器,但它不起作用。下面是配置。我无法理解我在这里遗漏了什么Logstash 日志存储中的日期筛选器因dateparsefailure而失败,logstash,logstash-configuration,datefilter,Logstash,Logstash Configuration,Datefilter,我有以下日志存储输出。我想用timestamp字段的值更新@timestamp字段(并最终从输出中删除timestamp字段)。我正在使用日期过滤器,但它不起作用。下面是配置。我无法理解我在这里遗漏了什么 Sample output { "@version" => "1", "Timestamp" => "2020-07-25T22:06:09.1282069+05:30",
Sample output
{
"@version" => "1",
"Timestamp" => "2020-07-25T22:06:09.1282069+05:30",
"Level" => "Information",
"headers" => {
"content_type" => "application/json; charset=utf-8",
"http_user_agent" => nil,
"request_path" => "/",
"http_host" => "localhost:8081",
"http_accept" => nil,
"request_method" => "POST",
"content_length" => "253",
"http_version" => "HTTP/1.1"
},
"tags" => [
[0] "_dateparsefailure"
],
"ExecutionId" => "4e1a5929-e52c-4aee-ae64-41f8750885ab",
"@timestamp" => 2020-07-25T16:36:09.474Z,
"RenderedMessage" => "This is Stream message with guid 4e1a5929-e52c-4aee-ae64-41f8750885ab",
"host" => "127.0.0.1",
"MessageTemplate" => "This is Stream message with guid 4e1a5929-e52c-4aee-ae64-41f8750885ab"
}
日期过滤器
filter {
date {
match => [ "Timestamp", "YYYY-MM-dd HH:mm:ss" ]
}
}
我通过使用ISO8601格式解决了这个问题
filter {
date {
match => [ "Timestamp", "ISO8601" ]
}
}