# Logstash error of strict dynamic mapping exception

**URL:** <https://discuss.elastic.co/t/logstash-error-of-strict-dynamic-mapping-exception/210883>\
**Category:** Logstash\
**Created:** [December 6, 2019, 11:58am UTC](https://discuss.elastic.co/t/logstash-error-of-strict-dynamic-mapping-exception/210883 "2019-12-06T11:58:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![karlm](https://avatars.discourse-cdn.com/v4/letter/k/d2c977/32.png) [@karlm](https://discuss.elastic.co/u/karlm)\
**Post date:** [December 6, 2019, 11:58am UTC](https://discuss.elastic.co/t/logstash-error-of-strict-dynamic-mapping-exception/210883/1 "2019-12-06T11:58:38Z")

</div>

Im using logstash 6.7 and when trying to create an index i receive the following error in the logs;

`'strict_dynamic_mapping_exception'. mapping set to strict, dynamic introduction of [dof] within [doc] is not allowed"`

my elasticsearch output is

```
output {      
  elasticsearch {
    hosts => ["http://localhost:9200"]
    index => "eventlogs-%{+xxxx.ww}"  
    
  }

```

how do i set the mapping to dynamic through log stash as it will be creating new indexes on weekly basis? It was working a couple of days ago without receiving the mapping error. Thanks

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [December 6, 2019, 1:29pm UTC](https://discuss.elastic.co/t/logstash-error-of-strict-dynamic-mapping-exception/210883/2 "2019-12-06T13:29:34Z")

</div>

The default value for [mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic.html) is true, not strict, so you must have an index template in elasticsearch that sets it to strict. You will need to modify that template.

---

<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 3, 2020, 3:05pm UTC](https://discuss.elastic.co/t/logstash-error-of-strict-dynamic-mapping-exception/210883/4 "2020-01-03T15:05:36Z")

</div>

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