# Elasticsearch template in logstash does not load?

**URL:** <https://discuss.elastic.co/t/elasticsearch-template-in-logstash-does-not-load/65556>\
**Category:** Logstash\
**Created:** [November 9, 2016, 8:45pm UTC](https://discuss.elastic.co/t/elasticsearch-template-in-logstash-does-not-load/65556 "2016-11-09T20:45:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![irom77](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/irom77/32/12976_2.png) [@irom77](https://discuss.elastic.co/u/irom77)\
**Post date:** [November 9, 2016, 8:45pm UTC](https://discuss.elastic.co/t/elasticsearch-template-in-logstash-does-not-load/65556/1 "2016-11-09T20:45:44Z")

</div>

I have template which is in fact copy&paste of my current auto mappings with two field types change to geo\_point but when I try to load it, actual mappings do not change ?

> output {  
> if [type] =="pa-traffic" {  
> elasticsearch {  
> ##protocol =\>"node"  
> hosts =\> "elasticsearch:9200"  
> index =\>"pa-traffic-%{+YYYY.MM.dd}"  
> #cluster =\> elastic-cluster-neteng-syslog  
> template =\> "/opt/elasticsearch-template.json"  
> template\_overwrite =\> true  
> }  
> #stdout { codec =\> rubydebug }  
> }  
> }

and

> $ head /opt/elasticsearch-template.json  
> {  
> "template": "pa-\*",  
> "settings" : {  
> "index.refresh\_interval" : "5s"  
> },  
> {  
> "mappings": {  
> "pa-traffic": {  
> "properties": {

I found this in logs, line: 6, column: 2 is just '{' before "mappings"

> [2016-11-09T21:25:36,606][ERROR][logstash.outputs.elasticsearch] Failed to install template. {:message=\>"Unexpected character ('{' (code 123)): was expecting double-quote to start field name\n at [Source: [B@22c6094b; line: 6, column: 2]", :class=\>"LogStash::Json::ParserError"}  
> [2016-11-09T21:25:36,607][INFO][logstash.outputs.elasticsearch]

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 14, 2016, 10:31am UTC](https://discuss.elastic.co/t/elasticsearch-template-in-logstash-does-not-load/65556/2 "2016-11-14T10:31:20Z")

</div>

It's hard to help unless we can see the mapping you are using 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 12, 2016, 10:31am UTC](https://discuss.elastic.co/t/elasticsearch-template-in-logstash-does-not-load/65556/3 "2016-12-12T10:31:48Z")

</div>

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