Hi, I am running the logstash config file and I am getting the error shown below.
[ERROR][logstash.outputs.Elasticsearch][main] Failed to install template {:message=>"Got response code '400' contacting Elasticsearch at URL 'http://localhost:9200/_template/compair_data'", :exception=>LogStash::Outputs::Elasticsearch::HttpClient::Pool::BadResponseCodeError, :backtrace=>["/Users/inder/Dropbox/Elastic/logstash-7.14.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-Elasticsearch-11.0.2-java/lib/logstash/outputs/Elasticsearch/http_client/manticore_adapter.rb:80:in perform_request'", "/Users/inder/Dropbox/Elastic/logstash-7.14.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-11.0.2-java/lib/logstash/outputs/elasticsearch/http_client/pool.rb:306:in
perform_request_to_url'", "/Users/inder/Dropbox/Elastic/logstash-7.14.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-Elasticsearch-11.0.2-java/lib/logstash/outputs/Elasticsearch/http_client/pool.rb:293:in block in perform_request'", "/Users/inder/Dropbox/Elastic/logstash-7.14.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-11.0.2-java/lib/logstash/outputs/elasticsearch/http_client/pool.rb:382:in
with_connection'", "/Users/inder/Dropbox/Elastic/logstash-7.14.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-Elasticsearch-11.0.2-java/lib/logstash/outputs/Elasticsearch/http_client/pool.rb:292:in perform_request'", "/Users/inder/Dropbox/Elastic/logstash-7.14.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-11.0.2-java/lib/logstash/outputs/elasticsearch/http_client/pool.rb:300:in
block in Pool'", "/Users/inder/Dropbox/Elastic/logstash-7.14.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-Elasticsearch-11.0.2-java/lib/logstash/outputs/Elasticsearch/http_client.rb:390:in template_put'", "/Users/inder/Dropbox/Elastic/logstash-7.14.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-11.0.2-java/lib/logstash/outputs/elasticsearch/http_client.rb:84:in
template_install'", "/Users/inder/Dropbox/Elastic/logstash-7.14.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-Elasticsearch-11.0.2-java/lib/logstash/outputs/Elasticsearch/template_manager.rb:29:in install'", "/Users/inder/Dropbox/Elastic/logstash-7.14.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-11.0.2-java/lib/logstash/outputs/elasticsearch/template_manager.rb:17:in
install_template'", "/Users/inder/Dropbox/Elastic/logstash-7.14.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-Elasticsearch-11.0.2-java/lib/logstash/outputs/Elasticsearch.rb:496:in install_template'", "/Users/inder/Dropbox/Elastic/logstash-7.14.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-11.0.2-java/lib/logstash/outputs/elasticsearch.rb:309:in
finish_register'", "/Users/inder/Dropbox/Elastic/logstash-7.14.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-Elasticsearch-11.0.2-java/lib/logstash/outputs/Elasticsearch.rb:279:in block in register'", "/Users/inder/Dropbox/Elastic/logstash-7.14.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-11.0.2-java/lib/logstash/plugin_mixins/elasticsearch/common.rb:145:in
block in after_successful_connection'"]}
Is there any way that you can help me with this please. I have also attached the json template below.
{
"template": "compair_data",
"settings": {
"number_of_shards": 1,
"number_of_replicas": 0
},
"mappings": {
"_doc": {
"_all": {
"enabled": true
},
"properties": {
"@timestamp": {
"type": "date"
},
"ID": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"TD": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"bp": {
"type": "float"
},
"bv": {
"type": "long"
},
"co": {
"type": "integer"
},
"co2": {
"type": "integer"
},
"date": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"db": {
"type": "integer"
},
"dt": {
"type": "date"
},
"hm": {
"type": "float"
},
"id": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"lat": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"lon": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"location": {
"type": "geo_point"
},
"no": {
"type": "integer"
},
"no2": {
"type": "integer"
},
"p10": {
"type": "integer"
},
"p1p0": {
"type": "integer"
},
"p2p5": {
"type": "integer"
},
"ps": {
"type": "boolean"
},
"sv": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"td": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"tm": {
"type": "float"
},
"vc": {
"type": "long"
}
}
}
}
}
Regards
Angad