如何在 AWS Elasticsearch 中将 AWS WAF 日志时间戳类型从 long(number) 更改为 date?

问题描述

我是使用 AWS WAF、AWS Elasticsearch 的初学者。

我想将 AWS WAF 日志时间戳类型从 long(number) 类型更改为 date 类型。

由于长类型时间戳在 Kibana 可视化和仪表板时间过滤中不起作用。

我在 AWS ES 开发工具上尝试了这个查询代码

enter image description here

但是,我刚刚收到这条消息。

enter image description here

我该如何解决这个问题?

非常感谢。

enter image description here

enter image description here

解决方法

您会显示原始索引查询吗?通过尝试修复此问题,您可能想尝试 reindex

用法:

POST _reindex 
{
  "source": {
     "index": "test-timestamps"
   },"dest": {
     "index": "test-timestamps-2"
   }
}