如何在Kibana + Elasticsearch中进行脚本集合? [英] How can I do scripted aggregation in Kibana + Elasticsearch?
问题描述
CTR =#clicks /#显示。
首先,有谁知道是否可以在Elasticsearch + Kibana做?我在基巴那看不到有可能做到这一点。
我正在考虑在原始的弹性搜索中通过脚本集合。但是我不知道如何在基巴那定义这个。
任何有关如何做到这一点的想法将是非常受欢迎的!
Kibana 4包括支持弹性搜索脚本。您可以转到设置>指数(选择您的模式)>脚本字段,并添加一个计算您的点击率的新脚本字段。请查看脚本字段弹性博客更多信息。
Let's say I have a log of events of ad displays and ad clicks stored via Logstash in Elasticsearch and displayed in Kibana 4. I would like to calculate a simple metric like CTR (Click-Through-Rate) of the events , which is :
CTR = #clicks/#displays.
First of all, does anyone know if it's possible to do in Elasticsearch + Kibana? I don't see a possibility to do it in Kibana. I was thinking about doing it in raw Elasticsearch by scripted aggregation. But I don't know how to define such in Kibana.
Any ideas on how to do it would be very welcome! Comments explaining that it's impossible to do it would be also valuable.
Kibana 4 includes support for Elasticsearch scripting. You can go to Settings > Indices (pick your pattern) > Scripted Fields and add a new scripted field that computes your CTR. Take a look at "Scripted Fields" at elastic blog for more info.
这篇关于如何在Kibana + Elasticsearch中进行脚本集合?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!