# Getting 400 Error for the Elastic Search

**URL:** <https://discuss.elastic.co/t/getting-400-error-for-the-elastic-search/353883>\
**Category:** Elasticsearch\
**Created:** [February 22, 2024, 12:21pm UTC](https://discuss.elastic.co/t/getting-400-error-for-the-elastic-search/353883 "2024-02-22T12:21:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![syedimran7861](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@syedimran7861](https://discuss.elastic.co/u/syedimran7861)\
**Post date:** [February 22, 2024, 12:21pm UTC](https://discuss.elastic.co/t/getting-400-error-for-the-elastic-search/353883/1 "2024-02-22T12:21:32Z")

</div>

failed to install template message= got response code '400' contacting elasticsearch

Configuration

```auto
{
  "order": 1,
  "index_patterns": [
    "log-default-*",
    "log-http-*"
  ],
  "settings": {
    "number_of_shards": 6,
    "number_of_replicas": 2
  },
  "mappings": {
    "dynamic_templates": [
      {
        "ips": {
          "match_pattern": "regex",
          "match": "^(?:orig_)?(?:src|dst)ip$",
          "mapping": {
            "type": "ip"
          }
        }
      },
      {
        "strings": {
          "match": "*",
          "unmatch": "*message",
          "match_mapping_type": "string",
          "mapping": {
            "type": "keyword"
          }
        }
      }
    ]
  }
}

```

---

<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:** [March 21, 2024, 12:22pm UTC](https://discuss.elastic.co/t/getting-400-error-for-the-elastic-search/353883/2 "2024-03-21T12:22:01Z")

</div>

Closed on March 21, 2024, 12:22pm UTC

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