【问题标题】:Eliminate duplicates from Kibana dashboard从 Kibana 仪表板中消除重复项
【发布时间】:2016-06-07 11:08:06
【问题描述】:

我有一个 ELK 仪表板,它使用来自 kafka 的数据。 输入的 JSON 数据有 4 列。例如列是 col1,col2,col3,col4。

每天有 100 条记录输入到弹性搜索中。

假设我想消除基于特定列的重复项 col1 ,有没有办法在 kibana 仪表板上做。

【问题讨论】:

    标签: elasticsearch logstash kibana kibana-4


    【解决方案1】:

    您不能使用 Kibana 删除文档。

    为此,您必须通过删除 API。

    为此,您必须检索要删除的文档的 ID,然后使用 api。

    或者使用插件 delete-by-query 同时做这两个操作:https://www.elastic.co/guide/en/elasticsearch/plugins/current/plugins-delete-by-query.html

    您可以使用此查询来检索字段 col1 上具有重复项的文档:

    {
      "size": 0,
      "aggs": {
        "duplicateCount": {
          "terms": {
            "field": "col1",
            "min_doc_count": 2
          },
          "aggs": {
            "duplicateDocuments": {
              "top_hits": {}
            }
          }
        }
      }
    }
    

    来源:https://qbox.io/blog/minimizing-document-duplication-in-elasticsearch

    【讨论】:

      猜你喜欢
      • 2015-03-07
      • 1970-01-01
      • 2017-11-17
      • 1970-01-01
      • 1970-01-01
      • 2017-04-28
      • 1970-01-01
      • 2015-01-10
      • 1970-01-01
      相关资源
      最近更新 更多