如何使用Kibana + Elastic Search检索字段的唯一计数 [英] How to retrieve unique count of a field using Kibana + Elastic Search

查看:971
本文介绍了如何使用Kibana + Elastic Search检索字段的唯一计数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以使用Kibana查询一个不同/唯一的字段计数吗?我正在使用弹性搜索作为我的后座到Kibana。

Is it possible to query for a distinct/unique count of a field using Kibana? I am using elastic search as my backend to Kibana.

如果是,查询的语法是什么?我想查询一下Kibana界面的链接: http://demo.kibana.org/#/dashboard

If so, what is the syntax of the query? Heres a link to the Kibana interface I would like to make my query: http://demo.kibana.org/#/dashboard

我正在使用logstash解析nginx访问日志,并将数据存储到弹性搜索中。然后,我使用Kibana来运行查询并在图表中可视化我的数据。具体来说,我想知道使用Kibana的特定时间框架中唯一IP地址的数量。

I am parsing nginx access logs with logstash and storing the data into elastic search. Then, I use Kibana to run queries and visualize my data in charts. Specifically, I want to know the count of unique IP addresses for a specific time frame using Kibana.

推荐答案

4转到此答案

这是简单的使用条款面板:

This is easy to do with a terms panel:

如果要选择日志中不同IP的计数,应在字段 clientip ,你应该放置一个足够大的数字(否则,它将加入不同的IP在同一个组),并在样式表中指定。添加面板后,您将拥有一个具有IP的表格,并且该IP的计数:

If you want to select the count of distinct IP that are in your logs, you should specify in the field clientip, you should put a big enough number in length (otherwise, it will join different IP under the same group) and specify in the style table. After adding the panel, you will have a table with IP, and the count of that IP:

这篇关于如何使用Kibana + Elastic Search检索字段的唯一计数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆