I am creating a new template in my elastic search using kibana dev console.
PUT _template/template_1
{
"index_patterns": ["ubq-*"],
"settings": {
"number_of_shards": 1
},
"mappings": {
"_doc": {
"properties": {
"Index": {
"type": "float",
"index": "true"
},
"Category":{
"type": "keyword",
"index": "true"
},
"Scat":{
"type": "keyword",
"index": "true"
},
"Sscat":{
"type": "keyword",
"index": "true"
},
"Products":{
"type": "keyword",
"index": "true"
},
"Measure":{
"type": "keyword",
"index": "true"
},
"Price":{
"type": "float",
"index": "true"
},
"Description":{
"type": "keyword",
"index": "true"
},
"Gst":{
"type": "float",
"index": "true"
}
}
}
}
}
I am using the following config file to upload data to elastic
input{
file{
path => "/Users/apple/Desktop/data/data.csv"
start_position =>"beginning"
}
}
filter{
csv{
separator => ","
columns => ["Index", "Category", "Scat", "Sscat", "Products", "Measure", "Price", "Description", "Gst"]
}
mutate{convert => ["Index", "float"] }
mutate{convert => ["Price", "float"] }
mutate{convert => ["Gst", "float"] }
}
output{
elasticsearch{
template_overwrite => true
hosts => "host"
user => "elastic"
password => "pass"
index => "ubq-gk"
}
}
The new index is not getting created at all even though i am not getting error whil running -f logstash command.
I am trying to make sure that every new index which has ubq- in its name should get the above mapping.