【问题标题】:getting issue in kibana dashboard - set fielddata=true在 kibana 仪表板中遇到问题 - 设置 fielddata=true
【发布时间】:2017-02-28 11:06:51
【问题描述】:

我正在使用 metricbeat 获取 Docker 性能数据,并且我正在尝试使用 Docker 性能数据生成仪表板。

我在 Kibana 仪表板中遇到的错误:

我在 metricbeat.template.json 中启用了 fielddata:true :

然后我重新启动 Metricbeat 和 Kibana 并启动。 问题仍然存在。这是三个错误:

Visualize: Fielddata is disabled on text fields by default. Set fielddata=true on [docker.container.name] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory.

Visualize: Fielddata is disabled on text fields by default. Set fielddata=true on [docker.container.id] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory.

Visualize: Fielddata is disabled on text fields by default. Set fielddata=true on [docker.container.image] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory.

谁能帮忙解决这个问题?

提前致谢。

【问题讨论】:

  • 你用的是什么版本的ES?
  • 我已经更新了答案。让我知道它是否有效!

标签: kibana elastic-stack kibana-5 metricbeat


【解决方案1】:

您可能必须通过将 fielddata 启用为 true 来更改字段 (name,id,image) 的 mappings。您的映射可能如下所示:

{
  "mappings": {
    "your_type": {
      "properties": {
        "name": {
          "type": "text",
          "fielddata": true
        },
        "id": {
          "type": "integer",
          "fielddata": true
        },
        "image": {
          "type": "text",
          "fielddata": true
        }
      }
    }
  }
}

也请查看doc。希望这会有所帮助!

编辑

我想问题在于使用类型 text 进行聚合,这在理想情况下会导致上述异常。文本类型字段本质上是analyzed,通常可以用于全文搜索。如果您考虑将 unanalyzed keyword 用于聚合 的目的,这可能对您有用。您还可以阅读更多关于此here 的信息,并查看此ticket,它从字面上谈到了同样的争议。

【讨论】:

  • 这是我尝试过的映射(在下面提到的答案部分中) - 我收到一个名为“Courier Fetch”的不同错误
  • @SoundaryaThiagarajan 如果我的回答对您有所帮助,请投票,或者如果它确实回答了,请随时将其标记为答案。谢谢
【解决方案2】:

这是我尝试过的映射:

PUT /metricbeat-*/_mapping/docker
{
  "properties":{
    "container":{
      "type":"text",
      "fields":{
        "name":{
          "type": "text",
          "analyzer": "standard",
          "fielddata": true
        },
        "id":{
          "type":"keyword"
        },
        "image":{
          "type": "text",
                    "fielddata": true
        }
      }
    }
  }
}

映射有效。 但是,我现在遇到了一个不同的错误 - Courier Fetch: 30 of 40 shards failed

【讨论】:

  • 这完全是另一个问题。由于它发生的原因,您可能需要查看几个原因。 SOticketthis thred 可能会对您有所帮助。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-04-12
  • 1970-01-01
  • 1970-01-01
  • 2017-04-28
  • 1970-01-01
相关资源
最近更新 更多