log4js-elasticsearch icon indicating copy to clipboard operation
log4js-elasticsearch copied to clipboard

logstash mapping layout no longer supported in new version of elasticsearch

Open mandeepm91 opened this issue 8 years ago • 3 comments

I am getting the following error while trying to write the logs to elasticsearch using logstash layout. I reckon the issue is related to the log4js-elasticsearch-layouts.js file since the mapping being used seems no longer supported in the latest version of elasticsearch. However, even when I tried to remove the part "path": "full" from the file, I am still getting the error in elasticsearch

    "mappings" : {
      "_default_" : {
         "_all" : {"enabled" : enableAll},
         "properties" : {
            "@fields" : { "type" : "object", "dynamic": true, "path": "full"},
            "@message": { "type": "string", "index": "analyzed" },
            "@source": { "type": "string", "index": "not_analyzed" },
            "@source_host": { "type": "string", "index": "not_analyzed" },
            "@source_path": { "type": "string", "index": "not_analyzed" },
            "@tags": { "type": "string", "index": "not_analyzed" },
            "@timestamp": { "type": "date", "index": "not_analyzed" },
            "@type": { "type": "string", "index": "not_analyzed" }
         }
      }
    }

[2016-04-11 16:30:38,712][DEBUG][action.admin.indices.create] [Armory] [logstash-2016.04.11] failed to create
MapperParsingException[Failed to parse mapping [_default_]: Mapping definition for [@fields] has unsupported parameters:  [path : full]]; nested: MapperParsingException[Mapping definition for [@fields] has unsupported parameters:  [path : full]];

mandeepm91 avatar Apr 11 '16 13:04 mandeepm91