Logstash data won't read new template

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.

You've probably processed data.csv before. Delete the sincedb file or set the file input's sincedb_path option to "/dev/null". This is an extremely common question.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.