Closed xekhz closed 1 year ago
With Elastic version 7.x this command
$ curl -X PUT -d @'graylog-custom-mapping.json' -H 'Content-Type: application/json' 'http://localhost:9200/_template/graylog-custom-mapping?pretty' Dosent work anymore for the graylog-custom-mapping.json
{ "template": "graylog_*", "mappings" : { "message" : { "properties" : { "haproxy_Tc" : { "type" : "long" }, "haproxy_Tt" : { "type" : "long" }, "haproxy_Tw" : { "type" : "long" }, "haproxy_bytesRead" : { "type" : "long" } } } } }
It is necessary to remove this line "message" : { And to remove the corresponding curly bracket }
The working graylog-custom-mapping.json is the following
{ "template": "graylog_*", "mappings" : {
"properties" : { "haproxy_Tc" : { "type" : "long" }, "haproxy_Tt" : { "type" : "long" }, "haproxy_Tw" : { "type" : "long" }, "haproxy_bytesRead" : { "type" : "long" } } }
}
Thanks for your work :)
Info: https://xyzcoder.github.io/elasticsearch/nest/2019/04/12/es-70-and-nest-mapping-error.html
added this info in the readme. Thanks.
With Elastic version 7.x this command
$ curl -X PUT -d @'graylog-custom-mapping.json' -H 'Content-Type: application/json' 'http://localhost:9200/_template/graylog-custom-mapping?pretty' Dosent work anymore for the graylog-custom-mapping.json
{ "template": "graylog_*", "mappings" : { "message" : { "properties" : { "haproxy_Tc" : { "type" : "long" }, "haproxy_Tt" : { "type" : "long" }, "haproxy_Tw" : { "type" : "long" }, "haproxy_bytesRead" : { "type" : "long" } } } } }
It is necessary to remove this line "message" : { And to remove the corresponding curly bracket }
The working graylog-custom-mapping.json is the following
{ "template": "graylog_*", "mappings" : {
}
Thanks for your work :)
Info: https://xyzcoder.github.io/elasticsearch/nest/2019/04/12/es-70-and-nest-mapping-error.html