【问题标题】:Inconsistency between Kibana and elasticsearch rest api search outputKibana和elasticsearch rest api搜索输出不一致
【发布时间】:2016-12-11 19:56:42
【问题描述】:

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

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

【问题讨论】:

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


    【解决方案1】:

    您的 curl 查询有一些问题,您有两次 ? 并且缺少一个 size 参数(默认情况下只返回 10 个结果)

    试试这个:

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

    【讨论】:

    • 你是那个男人!!..你也可以建议如何在两者之间使用通配符吗?所以我想请求类似“Request%20to%20Service%20timed%20out%20for%20product*someText”的东西,它应该匹配所有具有 someText 的记录
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-01-27
    • 2020-09-03
    • 1970-01-01
    • 1970-01-01
    • 2018-10-05
    • 2014-04-30
    • 2015-12-12
    相关资源
    最近更新 更多