Kibana Dashboard Error -- Set fielddata=true on fieldname

I am getting docker performance data using metricbeat and I am trying to produce Dashboards out of Docker Performance Data.

Errors I am getting In Kibana Dashboard:

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.
Can anyone help to fix the issue?

And I enabled fielddata:true in metricbeat.template.json :

          "docker": {
      "properties": {
        "container": {
          "properties": {
            "command": {
              "ignore_above": 1024,
              "type": "keyword"
            },
            "created": {
              "type": "date"
            },
            "id": {
              "type": "text",
              "fielddata":"true"
            },
            "image": {
              "type": "text",
              "fielddata": true
            },
            "name": {
              "type": "text",
              "fielddata":true
            },

and then I restarted Metricbeat and Kibana and started. Issue still remains.

Can anyone help to fix this issue?

Thanks in advance.

I think this can happen if data is sent to Elasticsearch before the template is loaded. Can you run GET /metricbeat-* in Dev tools and share the output? My guess is the setting in the template file is not being propagated to es.

Also which version are you running? In 5.1.2, this should happen automatically when you first run metricbeat.

If you don't have any data you need to preserve, you can try deleting the index and starting again. You can also try sending data to a new index name.

{
  "metricbeat-docker-2017.02.27": {
    "aliases": {},
    "mappings": {
      "_default_": {
        "_all": {
          "norms": false
        },
          "docker": {
            "properties": {
              "container": {
                "properties": {
                  "command": {
                    "type": "text",
                    "fields": {
                      "keyword": {
                        "type": "keyword",
                        "ignore_above": 256
                      }
                    }
                  },
                  "created": {
                    "type": "date"
                  },
                  "id": {
                    "type": "text",
                    "fields": {
                      "keyword": {
                        "type": "keyword",
                        "ignore_above": 256
                      }
                    }
                  },
                  "image": {
                    "type": "text",
                    "fields": {
                      "keyword": {
                        "type": "keyword",
                        "ignore_above": 256
                      }
                    }
                  },
 "settings": {
      "index": {
        "refresh_interval": "5s",
        "number_of_shards": "5",
        "provided_name": "metricbeat-2017.02.13",
        "creation_date": "1486944216468",
        "number_of_replicas": "1",
        "uuid": "-f78lFnRRe-Dbc1GB01hsA",
        "version": {
          "created": "5000099"
        }
      }
    }
  }
}

Yea, your fields are still marked as text only. If you change the visualizations to use the .keyword version it should work. For example change command to command.keyword. The .keyword variations are aggregatable.

PUT /metricbeat-docker-2017.02.29
"mappings": {
"docker": {
"properties": {
"command.keyword":{
"name": {
"type": "text",
"fielddata": true
},
"id": {
"type": "integer",
"fielddata": true
},
"image": {
"type": "text",
"fielddata": true
}
}
}
}
}

I am getting an error that -
"type": "index_already_exists_exception",
"reason": "index [metricbeat-docker-2017.02.29/qtGXcW0MSWS1JOl1gt55zw] already exists",
"index_uuid": "qtGXcW0MSWS1JOl1gt55zw",
"index": "metricbeat-docker-2017.02.29"
},
"status": 400

can you please help me with this

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.