# How to update the template as once?

**URL:** <https://discuss.elastic.co/t/how-to-update-the-template-as-once/110082>\
**Category:** Elasticsearch\
**Created:** [December 4, 2017, 3:05am UTC](https://discuss.elastic.co/t/how-to-update-the-template-as-once/110082 "2017-12-04T03:05:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Post date:** [December 4, 2017, 3:05am UTC](https://discuss.elastic.co/t/how-to-update-the-template-as-once/110082/1 "2017-12-04T03:05:25Z")

</div>

i use curl to put \_temlpate output error.  
curl -XPUT '[http://xx.xx.xx.xx:9200/\_template](http://xx.xx.xx.xx:9200/_template)' -d '{

error is

```
{
  "error": {
    "root_cause": [
      {
        "type": "remote_transport_exception",
        "reason": "[xxx.xxxx][xx.xx.xxx.xxx:9301][indices:admin/create]"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "unknown setting [index..monitoring-alerts.mappings.doc.dynamic] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
  },
  "status": 400
}
```

---

<div class="post-metadata">

**Author:** ![mujtabahussain](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mujtabahussain/32/17514_2.png) [@mujtabahussain](https://discuss.elastic.co/u/mujtabahussain)\
**Post date:** [December 4, 2017, 3:51am UTC](https://discuss.elastic.co/t/how-to-update-the-template-as-once/110082/2 "2017-12-04T03:51:47Z")

</div>

> [@zqc0512](#):
>
> index..monitoring-alerts.mappings.doc.dynamic

Is there a typo in your elasticsearch.yml?

---

<div class="post-metadata">

**Author:** ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Post date:** [December 4, 2017, 3:53am UTC](https://discuss.elastic.co/t/how-to-update-the-template-as-once/110082/3 "2017-12-04T03:53:54Z")

</div>

the setting not in elasticsearch.yml about monitoring-alerts.mappings.

---

<div class="post-metadata">

**Author:** ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Post date:** [December 4, 2017, 3:55am UTC](https://discuss.elastic.co/t/how-to-update-the-template-as-once/110082/4 "2017-12-04T03:55:08Z")

</div>

i use curl -xget [http://xx.xx.xxx:9200/\_template](http://xx.xx.xxx:9200/_template) but can't put this use curl -xput .

---

<div class="post-metadata">

**Author:** ![mujtabahussain](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mujtabahussain/32/17514_2.png) [@mujtabahussain](https://discuss.elastic.co/u/mujtabahussain)\
**Post date:** [December 4, 2017, 3:55am UTC](https://discuss.elastic.co/t/how-to-update-the-template-as-once/110082/5 "2017-12-04T03:55:33Z")

</div>

Sure! Although the two `..` between index and monitoring seem suspicious! Can you confirm there isnt a typo there in that setting? Should it be `index.monitoring-alerts.mappings.doc.dynamic` ?

---

<div class="post-metadata">

**Author:** ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Post date:** [December 4, 2017, 4:01am UTC](https://discuss.elastic.co/t/how-to-update-the-template-as-once/110082/6 "2017-12-04T04:01:39Z")

</div>

yes the template is start with **.** is auto create by x-pack ..

it this .

```
".monitoring-alerts": {
    "order": 0,
    "version": 5050099,
    "template": ".monitoring-alerts-6",
    "settings": {
      "index": {
        "format": "6",
        "codec": "best_compression",
        "number_of_shards": "1",
        "number_of_replicas": "1"
      }
    },
    "mappings": {
      "doc": {
        "dynamic": false,
        "properties": {
          "timestamp": {
            "type": "date"
          },
          "update_timestamp": {
            "type": "date"
          },
          "resolved_timestamp": {
            "type": "date"
          },
          "prefix": {
            "type": "text"
          },
          "message": {
            "type": "text"
          },
          "suffix": {
            "type": "text"
          },
          "metadata": {
            "properties": {
              "cluster_uuid": {
                "type": "keyword"
              },
              "link": {
                "type": "keyword"
              },
              "severity": {
                "type": "short"
              },
              "type": {
                "type": "keyword"
              },
              "version": {
                "type": "keyword"
              },
              "watch": {
                "type": "keyword"
              }
            }
          }
        }
      }
    },
    "aliases": {

    }
  },
```

---

<div class="post-metadata">

**Author:** ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Post date:** [December 4, 2017, 4:05am UTC](https://discuss.elastic.co/t/how-to-update-the-template-as-once/110082/7 "2017-12-04T04:05:00Z")

</div>

put one mapping about it can put.  
as (.monitoring-alerts) mapping not all the mappings can put.

---

<div class="post-metadata">

**Author:** ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Post date:** [December 5, 2017, 3:35am UTC](https://discuss.elastic.co/t/how-to-update-the-template-as-once/110082/8 "2017-12-05T03:35:41Z")

</div>

there is no way update the all \_teamplte once?

---

<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:** [January 2, 2018, 3:35am UTC](https://discuss.elastic.co/t/how-to-update-the-template-as-once/110082/9 "2018-01-02T03:35:50Z")

</div>

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