# How to setup two different output (index, pipeline) with Filebeat

**URL:** <https://discuss.elastic.co/t/how-to-setup-two-different-output-index-pipeline-with-filebeat/280951>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 10, 2021, 5:06pm UTC](https://discuss.elastic.co/t/how-to-setup-two-different-output-index-pipeline-with-filebeat/280951 "2021-08-10T17:06:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chriselk](https://avatars.discourse-cdn.com/v4/letter/c/ecae2f/32.png) [@chriselk](https://discuss.elastic.co/u/chriselk)\
**Post date:** [August 10, 2021, 5:06pm UTC](https://discuss.elastic.co/t/how-to-setup-two-different-output-index-pipeline-with-filebeat/280951/1 "2021-08-10T17:06:09Z")

</div>

I'm trying to setup with one filebeat instance the apache module and the Tomcat module because we have done customisation in the pipeline and would like to have two separate indices I try the following  
configuration:

```auto
output.elasticsearch:
    hosts: ["node1:9200" , "node2:9200" , "node3:9200"]
    api_key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    protocol: "https"
    indices:
        - index: "httpd_dev-%{+yyyy.MM}"
          when.equals:
            event.category: "web"
        - index: "tomcat_dev-%{+yyyy.MM}"
          when.equals:
            event.category: "tomcat"
    pipelines:
        - pipeline: "filebeat-7.13.2-apache-*"
          when.equals:
            event.category: "httpd"
        - pipeline: "filebeat-7.13.2-tomcat-*"
          when.equals:
            event.category: "tomcat"

```

But the result seem to be that all the event are sent to the tomcat pipeline and the tomcat index , when I setup the apache module alone the module worked fine.

---

<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:** [September 7, 2021, 7:06pm UTC](https://discuss.elastic.co/t/how-to-setup-two-different-output-index-pipeline-with-filebeat/280951/2 "2021-09-07T19:06:23Z")

</div>

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