简体   繁体   English

更改 kibana 中的日期格式

[英]Change the date format in kibana

I am working for my internship on the implementation of the ElasticSearch family (ElasticSearch+ Kibana+ logstash).我正在为我的 ElasticSearch 系列 (ElasticSearch+ Kibana+ logstash) 的实施实习。 Here is my question: I have a field "@ timestamp" with the following format: 2014-05-23T14: 56:18.055 Z. I would like to extract only the time ( hh:mm) and display it in a "table" in Kibana.这是我的问题:我有一个字段“@timestamp”,格式如下:2014-05-23T14:56:18.055 Z。我只想提取时间(hh:mm)并将其显示在“表”中在基巴纳。 I would also extract only the date in the format YYYY-MM-dd.我还将仅提取格式为 YYYY-MM-dd 的日期。 I saw that it was possible in the case of a "Histogram" (always in Kibana) there is an option to change the format of the date, I tried to modify a little bit the file “module.js” but I still don't get any solution.我看到在“直方图”(始终在 Kibana 中)的情况下,可以选择更改日期格式,我尝试稍微修改文件“module.js”,但我仍然没有没有得到任何解决方案。 . .

Could anyone help me Thanks in advance任何人都可以帮助我提前谢谢

There is a way to do this.有一种方法可以做到这一点。 You need to set "dynamic_date_formats" to your root object mapping.您需要将“dynamic_date_formats”设置为您的根对象映射。 Check out this post.看看这篇文章。 I tried this using the .NET client NEST (which is 1 level above the native implementation) and it worked, so it will definitely work if you are using the native implementation.我使用 .NET 客户端 NEST(比本机实现高 1 级)尝试了此操作,并且它有效,因此如果您使用本机实现,它肯定会有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM