# How to output to multiple indexes straight from filebeat.yml

**URL:** <https://discuss.elastic.co/t/how-to-output-to-multiple-indexes-straight-from-filebeat-yml/160602>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [December 12, 2018, 6:34pm UTC](https://discuss.elastic.co/t/how-to-output-to-multiple-indexes-straight-from-filebeat-yml/160602 "2018-12-12T18:34:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Min\_Li](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/min_li/32/38742_2.png) [@Min\_Li](https://discuss.elastic.co/u/Min_Li)\
**Post date:** [December 12, 2018, 6:34pm UTC](https://discuss.elastic.co/t/how-to-output-to-multiple-indexes-straight-from-filebeat-yml/160602/1 "2018-12-12T18:34:11Z")

</div>

how to change logstash conf file to filebeats, multiple input to multiple indexes straight to elastic

logstash.conf

input {  
file {  
path =\> "/var/loginmgr/portal.txt"  
type =\> "loginmgr"  
start\_position =\> "beginning"  
}

```
file {
    path => "/var/manager/fcp_log.txt"
    type => "manager"
    start_position => "beginning"
}

file {
    path => "/var/log/cfgserver.log"
    type => "cfgserver"
    start_position => "beginning"
}

```

}  
output {

```
if [type] == "loginmgr" {
    elasticsearch {
        hosts => ["192.168.228.232:9200"]
        index => "loginmgr-%{+YYYY.MM.dd}"
    }
}

if [type] == "manager" {
    elasticsearch {
        hosts => ["192.168.228.232:9200"]
        index => "manager-%{+YYYY.MM.dd}"
    }
}

if [type] == "cfgserver" {
    elasticsearch {
        hosts => ["192.168.228.232:9200"]
        index => "cfgserver-%{+YYYY.MM.dd}"
    }
}

```

}

---

<div class="post-metadata">

**Author:** ![bigphil](https://avatars.discourse-cdn.com/v4/letter/b/65b543/32.png) [@bigphil](https://discuss.elastic.co/u/bigphil)\
**Post date:** [December 12, 2018, 7:17pm UTC](https://discuss.elastic.co/t/how-to-output-to-multiple-indexes-straight-from-filebeat-yml/160602/2 "2018-12-12T19:17:52Z")

</div>

I don't believe event routing is possible yet in Filebeat output.

---

<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 9, 2019, 7:17pm UTC](https://discuss.elastic.co/t/how-to-output-to-multiple-indexes-straight-from-filebeat-yml/160602/3 "2019-01-09T19:17:53Z")

</div>

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