# Error while installing index templates

**URL:** <https://discuss.elastic.co/t/error-while-installing-index-templates/309110>\
**Category:** Logstash\
**Created:** [July 7, 2022, 12:11pm UTC](https://discuss.elastic.co/t/error-while-installing-index-templates/309110 "2022-07-07T12:11:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thuunder7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thuunder7/32/97482_2.png) [@Thuunder7](https://discuss.elastic.co/u/Thuunder7)\
**Post date:** [July 7, 2022, 12:11pm UTC](https://discuss.elastic.co/t/error-while-installing-index-templates/309110/1 "2022-07-07T12:11:30Z")

</div>

Hi guys,

I am having a problem across some pipelines on logstash. Everytime i restart or start logstash i can see that it outputs an error line for some of the pipelines configured. The error is the following:

> Failed to install template {:message=\>"Got response code '400' contacting Elasticsearch at URL '[https://xxxxx:9200/\_index\_template/my-template-test](https://xxxxx:9200/_index_template/my-template-test)'"

I don't know what is causing this to happen.  
My logstash version are 8.3.1.

An example of the template is the following:

```auto
{
    "index_patterns": [
        "xxx1-*",
        "xxx2-*",
        "xxx3-*"
    ],
    "settings": {
        "index": {
            "number_of_shards": "2",
            "number_of_replicas": "1",
            "lifecycle": {
                "name": "example-policy"
            }
        }
    },
    "mappings": {
        "properties" : {
            "@timestamp" : {
                "type" : "date"
            },
            "acronym" : {
                "type" : "keyword"
            },
            "@version" : {
                "type" : "text",
                "fields" : {
                    "keyword" : {
                        "type" : "keyword",
                        "ignore_above" : 256
                }
              }
            },
            "app" : {
                "type" : "keyword"
            },
            "app-alias" : {
                "type" : "keyword"
            },
            "env" : {
                "type": "keyword"
            },
            "facility" : {
                "type" : "long"
            }
        }
    }
}

```

Do you have any ideas?  
Thank you

---

<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:** [August 4, 2022, 12:11pm UTC](https://discuss.elastic.co/t/error-while-installing-index-templates/309110/2 "2022-08-04T12:11:35Z")

</div>

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