# Logstash kafka input combining topics and topics\_pattern

**URL:** <https://discuss.elastic.co/t/logstash-kafka-input-combining-topics-and-topics-pattern/110747>\
**Category:** Logstash\
**Created:** [December 7, 2017, 9:09pm UTC](https://discuss.elastic.co/t/logstash-kafka-input-combining-topics-and-topics-pattern/110747 "2017-12-07T21:09:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ferdous\_Shibly](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ferdous_shibly/32/23470_2.png) [@Ferdous\_Shibly](https://discuss.elastic.co/u/Ferdous_Shibly)\
**Post date:** [December 7, 2017, 9:09pm UTC](https://discuss.elastic.co/t/logstash-kafka-input-combining-topics-and-topics-pattern/110747/1 "2017-12-07T21:09:01Z")

</div>

We are collection logs from different kafka topics which are been created dynamically. The common pattern of the topic naming is application\_name-log\_type-logs. We have also some important topics too like qafilebeat, prfilebeat. How can we combine topics and topics\_pattern options in logstash? Here is our current configuration

```
input{
  kafka
  {
    bootstrap_servers => ["kafka1:9092"]
    topics => ["logstash", "qafilebeat", "prfilebeat", "application1-error-logs", "application1-redirect-logs"]
    auto_offset_reset => latest
    decorate_events => true
    group_id => "logstash_indexer"
  }
}
```

---

<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 4, 2018, 9:09pm UTC](https://discuss.elastic.co/t/logstash-kafka-input-combining-topics-and-topics-pattern/110747/2 "2018-01-04T21:09:04Z")

</div>

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