# Split messages coming from the same port to different indexes

**URL:** <https://discuss.elastic.co/t/split-messages-coming-from-the-same-port-to-different-indexes/289548>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [November 18, 2021, 8:32am UTC](https://discuss.elastic.co/t/split-messages-coming-from-the-same-port-to-different-indexes/289548 "2021-11-18T08:32:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sederfo](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@Sederfo](https://discuss.elastic.co/u/Sederfo)\
**Post date:** [November 18, 2021, 8:32am UTC](https://discuss.elastic.co/t/split-messages-coming-from-the-same-port-to-different-indexes/289548/1 "2021-11-18T08:32:49Z")

</div>

Hi! We use Filebeat and we receive messages from different sources with the same port. Is the a way to send these messages that come from the same port to different indexes? For example, switch messages should only be send to the switch index and FW messages only to the FW index.

---

<div class="post-metadata">

**Author:** ![sidharth\_vijayakumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sidharth_vijayakumar/32/97257_2.png) [@sidharth\_vijayakumar](https://discuss.elastic.co/u/sidharth_vijayakumar)\
**Post date:** [November 18, 2021, 9:34am UTC](https://discuss.elastic.co/t/split-messages-coming-from-the-same-port-to-different-indexes/289548/2 "2021-11-18T09:34:25Z")

</div>

Hi,

This should be possible if u set a condition in ingest node pipeline. if these patterns has some different source then try to use a grok processor to capture these source and then use script processor to send it to index which u want it to go.

---

<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:** [December 16, 2021, 11:35am UTC](https://discuss.elastic.co/t/split-messages-coming-from-the-same-port-to-different-indexes/289548/3 "2021-12-16T11:35:02Z")

</div>

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