How can I do scripted aggregation in Kibana + Elasticsearch?

后端 未结 2 1945
眼角桃花
眼角桃花 2020-12-30 04:52

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

相关标签:
2条回答
  • 2020-12-30 05:15

    I had to do something similar for a customer, but couldn't manage to get it done using scripted fields, because I had to sum UP all the values on each aggregation. I ended up developing a custom visualization (Plugin). This was for Kibana 4.1 and 4.5.1.

    Let me know if this is what you are looking for, or if you want to give it a go yourself I can give you some pointers.

    0 讨论(0)
  • 2020-12-30 05:19

    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.

    0 讨论(0)
提交回复
热议问题