# Why my ES mapping that automatically creating through logstash have so many unreadable types?

**URL:** <https://discuss.elastic.co/t/why-my-es-mapping-that-automatically-creating-through-logstash-have-so-many-unreadable-types/189274>\
**Category:** Logstash\
**Created:** [July 8, 2019, 2:19am UTC](https://discuss.elastic.co/t/why-my-es-mapping-that-automatically-creating-through-logstash-have-so-many-unreadable-types/189274 "2019-07-08T02:19:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Haitianisgood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/haitianisgood/32/33563_2.png) [@Haitianisgood](https://discuss.elastic.co/u/Haitianisgood)\
**Post date:** [July 8, 2019, 2:19am UTC](https://discuss.elastic.co/t/why-my-es-mapping-that-automatically-creating-through-logstash-have-so-many-unreadable-types/189274/1 "2019-07-08T02:19:12Z")

</div>

ENV:

```auto
logstash 6.2.4
elasticsearch 6.2.4

```

My logstash config:

```auto
filter {
  if [type] == "pro" {
         ............
        prune {
           whitelist_names => ["^@timestamp$","^index_month$","^type$","^model$","^host$","^agent$","^version$","^path$","^uripath$","^message$","^@version$","^userId$","^level$","^os$","^from$","^ip$","^geoip$"]
        }
      }
  }
}

```

I have use `prune` moble and list the types what I want to output to ES, but still has some unreadable types in ES mapping.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/2/52c3d9067aa8b0673dba8da3572c76ae28185ae1.png)

---

<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:** [July 8, 2019, 1:14pm UTC](https://discuss.elastic.co/t/why-my-es-mapping-that-automatically-creating-through-logstash-have-so-many-unreadable-types/189274/2 "2019-07-08T13:14:43Z")

</div>

Have you confirmed that [type] is equal to "pro"?

---

<div class="post-metadata">

**Author:** ![Haitianisgood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/haitianisgood/32/33563_2.png) [@Haitianisgood](https://discuss.elastic.co/u/Haitianisgood)\
**Post date:** [July 9, 2019, 2:09am UTC](https://discuss.elastic.co/t/why-my-es-mapping-that-automatically-creating-through-logstash-have-so-many-unreadable-types/189274/3 "2019-07-09T02:09:00Z")

</div>

Thanks for your reply!

Most data had output into ES ,but still unreadable types into ES when index creating.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [July 9, 2019, 5:33am UTC](https://discuss.elastic.co/t/why-my-es-mapping-that-automatically-creating-through-logstash-have-so-many-unreadable-types/189274/4 "2019-07-09T05:33:34Z")

</div>

Can you show us the logstash config part where you set type to `pro`? The mappings indicate that you are indexing with document type set to `doc`, but that could off course be set in your elasticsearch output plugin.

---

<div class="post-metadata">

**Author:** ![Haitianisgood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/haitianisgood/32/33563_2.png) [@Haitianisgood](https://discuss.elastic.co/u/Haitianisgood)\
**Post date:** [July 9, 2019, 8:54am UTC](https://discuss.elastic.co/t/why-my-es-mapping-that-automatically-creating-through-logstash-have-so-many-unreadable-types/189274/5 "2019-07-09T08:54:25Z")

</div>

Thanks for your reply!

The `type` I set in input of logstash config.

```auto
input {
  kafka {
        bootstrap_servers => "kafka.app.com:9092"
        topics => ["app"]
        codec => "json"
        type => "pro"
        group_id => "pro"
        consumer_threads => 2
  }
}

```

output :

```auto
output {

  if [type] == "pro" {

      if [level] == "DEBUG" {
          elasticsearch {
              codec => plain{ charset => "UTF-8" }
              hosts => "http://es.app.com:9200"
              index => "logstash-app-%{index_month}"
          }
      }

  }

}

```

---

<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 6, 2019, 8:54am UTC](https://discuss.elastic.co/t/why-my-es-mapping-that-automatically-creating-through-logstash-have-so-many-unreadable-types/189274/6 "2019-08-06T08:54:25Z")

</div>

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