我正在尝试使用日期字段上的Elasticsearch数据填充kibana中的仪表板。
我有带日期的日志文件,我发现我没有@timestamp
。
这是映射:
PUT test2
{
"settings": {
"index.mapping.ignore_malformed": true
},
"mappings": {
"my_type": {
"properties": {
"Size": {"type": "integer","ignore_malformed": true },
"Copy Size": {"type": "integer","ignore_malformed": true }
"Email Sent Time": {"type": "date"},
"Creation Time": {"type": "date"},
"Modification Time": {"type": "date"}
}
}
}
}
如何添加默认时间戳?在kibana中创建面积图。
最佳答案
从前,Elasticsearch曾经支持将默认时间戳自动添加到您放入索引的所有文档中。创建索引时,映射类似于以下内容:
"mappings" : {
"_default_":{
"_timestamp" : {
"enabled" : true,
"store" : true
}
}
}
但是,如您在this link上看到的,它已被版本5.x弃用。今天,建议在应用程序端使用当前时间戳填充常规日期字段。
关于elasticsearch - 如何将默认@timestamp添加到我的 Elasticsearch 数据中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53884110/