elastic / elasticsearch-migration

This plugin will help you to check whether you can upgrade directly to the next major version of Elasticsearch, or whether you need to make changes to your data and cluster before doing so.
290 stars 32 forks source link

Migration plugin does not detect "path":"full" mapping #47

Closed seang-es closed 8 years ago

seang-es commented 8 years ago

Older Logstash templates include a "path":"full" directive in the mapping under their "geoip" definition. This is no longer supported by Elasticsearch, and if the existing Logstash template includes "path":"full", LS will silently fail to create its daily index and nothing will be ingested after upgrade. The migration tool should flag this for correction so the user can update Logstash and correct the existing template.

schmichael commented 8 years ago

The issue is that template mappings (and perhaps templates altogether) aren't checked. This bit me with a different invalid template mapping.

clintongormley commented 8 years ago

Yes, not much we can do about index templates. Closing

fpeterschmitt commented 7 years ago

Just to add a solution for anyone coming to this issue:

$ curl http://localhost:9200/_template/logstash?pretty=true > logstash.template.json
# edit logstash.template.json so you get a template as defined by this documentation : https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html

# now update the template
$ cat logstash.template.json |curl -XPUT http://localhost:9200/_template/logstash -d '@-'
{"acknowledged":true}

I've not done the logstash part because I don't need to do it.

Now you can upgrade your indices :)