我们正在通过filebeat向Elasticsearch注入数据,并且遇到了一个配置问题。
我正在尝试为特定字段指定日期格式(标准@timestamp字段保存索引时间,而我们需要实际的事件时间)。到目前为止,我还不能这样做-我尝试了fields.yml,单独的json模板文件,在filebeat.yml中内联指定它。最后一种选择只是一种猜测,我还没有找到这种特殊配置组合的任何示例。
这里我漏掉了什么?我确信这会起作用:
filebeat.yml
#rest of the file
template:
# Template name. By default the template name is filebeat.
#name: "filebeat"
# Path to template file
path: "custom-template.json"和custom-template.json中
{
"mappings": {
"doc": {
"properties": {
"eventTime": {
"type": "date",
"format": "YYYY-MM-dd HH:mm:ss.SSSS"
}
}
}
}
}但事实并非如此。
我们使用的是Filebeat版本6.2.4和Elasticsearch 6.x
发布于 2018-08-03 16:53:05
我无法让Filebeat配置正常工作。因此,最后更改了我们服务中的时间字段格式,并立即生效。
我发现官方的Filebeat文档缺乏完整的例子。也许这就是我的问题
编辑实际上,结果是您可以指定允许的格式列表in your mapping
https://stackoverflow.com/questions/51638019
复制相似问题