# Syntax for index redirection (in module 'output')?

**URL:** <https://discuss.elastic.co/t/syntax-for-index-redirection-in-module-output/148303>\
**Category:** Logstash\
**Created:** [September 12, 2018, 10:58am UTC](https://discuss.elastic.co/t/syntax-for-index-redirection-in-module-output/148303 "2018-09-12T10:58:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ethrbunny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ethrbunny/32/34603_2.png) [@ethrbunny](https://discuss.elastic.co/u/ethrbunny)\
**Post date:** [September 12, 2018, 10:58am UTC](https://discuss.elastic.co/t/syntax-for-index-redirection-in-module-output/148303/1 "2018-09-12T10:58:29Z")

</div>

In the 'output' section of my beats.conf I want to send different types of input to different indexes. The 'filter' section lets me pick and choose like so: "if [fileset][module] =~ " --\> is there a way to do this in the 'output' section?

Presently I use this format:  
index =\> "%{[@metadata][beat]}-%{+YYYY.MM.dd}"

How would I pick off entries from [fileset][module] =~ "auditd" and send those to their own index separate from other filebeat entries?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 12, 2018, 5:01pm UTC](https://discuss.elastic.co/t/syntax-for-index-redirection-in-module-output/148303/2 "2018-09-12T17:01:01Z")

</div>

> is there a way to do this in the 'output' section?

Yes. It works in exactly the same way as in the filter section.

---

<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:** [October 10, 2018, 5:01pm UTC](https://discuss.elastic.co/t/syntax-for-index-redirection-in-module-output/148303/3 "2018-10-10T17:01:13Z")

</div>

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