i would like to copy logstash template to a newname template. I did a GET _template/logstash , copied and edited (replace the word "logstash" with "blah")
Did a PUT but got an error of:
{
"error": {
"root_cause": [
{
"type": "parse_exception",
"reason": "unknown key [blah] in the template "
}
],
"type": "parse_exception",
"reason": "unknown key [blah] in the template "
},
"status": 400
}
PUT _template/blah
{
"blah" : {
"order" : 0,
"version" : 60001,
"index_patterns" : [
"blah-*"
],
"settings" : {
"index" : {
"number_of_shards" : "1",
"refresh_interval" : "5s"
}
},
"mappings" : {
"dynamic_templates" : [
{
"message_field" : {
"path_match" : "message",
"mapping" : {
"norms" : false,
"type" : "text"
},
"match_mapping_type" : "string"
}
},
{
"string_fields" : {
"mapping" : {
"norms" : false,
"type" : "text",
"fields" : {
"keyword" : {
"ignore_above" : 256,
"type" : "keyword"
}
}
},
"match_mapping_type" : "string",
"match" : "*"
}
}
],
"properties" : {
"@timestamp" : {
"type" : "date"
},
"geoip" : {
"dynamic" : true,
"properties" : {
"ip" : {
"type" : "ip"
},
"latitude" : {
"type" : "half_float"
},
"location" : {
"type" : "geo_point"
},
"longitude" : {
"type" : "half_float"
}
}
},
"@version" : {
"type" : "keyword"
}
}
},
"aliases" : { }
}
}
How do I copy logstash template? such that i can use "blah" in my index names?
thanks!
Sirjune