Not seeing any Fields for a non-Count Y-Axis aggregation

空扰寡人 提交于 2020-01-03 14:21:07

问题


I'm trying to graph out average response time from http logs. When I go to Visualize and try either a bar or line graph, any time that select a different Aggregation type besides Count(ie Average, Sum, Max, etc), I never get any values in the Field drop down. I believe that the X-Axis should/could just be a Date Histogram.

My query looks like this: "host:'hostname' AND file:'access.log'", which generates a ton of results as a Count, but again, can't seem to figure out how to graph out that other trend over time(outside of a count). I can confirm all my fields are being indexed.

Thanks.


回答1:


The issue in this case came down to mappings, and how the fields were all being interpreted as strings, which makes it impossible to do any of the other number related Aggregations. The only way I found this out is via a tweet from Rashid(the lead dev of Kibana) tweet from Rashid to me.

Essentially, as documented in the grok docs, I needed to define the mapping type:

%{NUMBER:request_time}

Became:

%{NUMBER:request_time:float}

After re-indexing and re-mapping, now my fields are mapping to the right type, and now I can do number based aggregations.



来源:https://stackoverflow.com/questions/29042125/not-seeing-any-fields-for-a-non-count-y-axis-aggregation

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!