Kibana和elasticsearch rest api搜索输出之间的不一致

时间:2016-08-05 11:52:28

标签: rest elasticsearch kibana-4 elastic-stack filebeat

我已经设置了ELK Stack。当我在kibana中查询某种类型的日志事件时,它从启动开始就给出了20个结果,这是正确的结果,但是当我使用curl查询相同类型的日志事件时,使用curl它只返回10个结果。不知道这里有什么问题..请注意我在双方的消息字段中查询字符串。
My Curl查询:看起来像这样:

curl -XGET 'http://localhost:9200/filebeat-*/_search?q=message:Request%20to%20Service%20timed%20out%20for%20product?human&pretty'

1 个答案:

答案 0 :(得分:0)

您的卷曲查询存在一些问题,您有?两次,并且您错过了size参数(默认情况下只返回10个结果)

请改为尝试:

curl -XGET 'http://localhost:9200/filebeat-*/_search?q=message:"Request%20to%20Service%20timed%20out%20for%20product"&size=100&pretty'