在模拟ElasticSearch摄取管道以处理Thu, 19 Sep 2019 20:28:58 GMT格式的时间戳时,使用DATESTAMP_RFC2822 pattern会失败。
我在这里遗漏了什么,有什么建议吗?
示例:
POST _ingest/pipeline/_simulate
{
"pipeline" :
{
"description": "testing...",
"processors" : [
{
"grok" : {
"field" : "message",
"patterns" : [
"%{DATESTAMP_RFC2822:initial_date}"
],
"on_failure" : [
{
"set" : {
"field" : "error",
"value" : "{{ _ingest.on_failure_message }}"
}
},
{
"set" : {
"field" : "grok_error",
"value" : true
}
}
]
}
}
]
},
"docs": [
{
"_index": "index",
"_id": "1",
"_source": {
"message": "Thu 19 Sep 2019 20:28:58 GMT"
}
}
]
}...results in:
"Provided Grok expressions do not match field value: [Thu 19 Sep 2019 20:28:58 GMT]",发布于 2019-09-20 10:13:12
日期筛选器无法解析时区名称。您可以使用%{DAY},%{MONTHDAY} %{MONTH} %{YEAR} %{TIME} %{WORD}
WORD将匹配任何单词(不一定是时区)。如果您使用的是任何特定时区,则可以将WORD替换为该时区。
https://stackoverflow.com/questions/58019392
复制相似问题