How to update the template as once?

i use curl to put _temlpate output error.
curl -XPUT '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
}

Is there a typo in your elasticsearch.yml?

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

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

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 ?

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": {

    }
  },

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

there is no way update the all _teamplte once?

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