# \[Question\] Is output routing possible in Filebeat

**URL:** <https://discuss.elastic.co/t/question-is-output-routing-possible-in-filebeat/107419>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [November 13, 2017, 3:38pm UTC](https://discuss.elastic.co/t/question-is-output-routing-possible-in-filebeat/107419 "2017-11-13T15:38:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moep90](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/moep90/32/24143_2.png) [@Moep90](https://discuss.elastic.co/u/Moep90)\
**Post date:** [November 13, 2017, 3:38pm UTC](https://discuss.elastic.co/t/question-is-output-routing-possible-in-filebeat/107419/1 "2017-11-13T15:38:46Z")

</div>

Hey there,

currently I'm working on configuring an ELK Stack.

- Filebeat should put JSON oneliners ONLY into Logstash for parsing.
- Filebeat should put /var/log/secure, /var/log/yum.log, /var/log/audit/audit.log directly into Elasticsearch.

With my current configuration, I only achieve that both prospectors where send to both outputs....  
I thought pipelineing will help here but it didn't... Maybe my approach is wrong?

What I have so far:

```auto
filebeat.prospectors:
- input_type: log
  paths:
- /var/lib/docker/containers/*/*-json.log
  json.keys_under_root: true
  json.add_error_key: true
  fields:
type: "docker"
  tags: ["json"]

- paths:
- /var/log/secure
- /var/log/yum.log
- /var/log/audit/audit.log
  fields:
type: "syslog"
  tags: ["syslog"]

output.elasticsearch:
  hosts: ["host:port"]
  index: "syslog-%{+yyyy.MM}"
  pipelines:
    - pipeline: syslog_pipeline
      when.equals:
        fields.syslog: "syslog"

output.logstash:
  hosts: ["host:port"]
  pipelines:
    - pipeline: docker_pipeline
      when.equals:
        fields.type: "docker"

```

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [November 13, 2017, 7:16pm UTC](https://discuss.elastic.co/t/question-is-output-routing-possible-in-filebeat/107419/2 "2017-11-13T19:16:07Z")

</div>

This kind of event routing is currently not possible with filebeat. The `pipeline` setting is for configuring the ingest node pipeline in Elasticsearch. This setting is not available for logstash.  
Either use 2 filebeat instances or send all events to one output type only.

In 6.0 only one output can be selected, but the `pipeline` can be configured in the prospector. The `pipeline` setting is then forwarded to Logstash in the `@metadata.pipeline` setting. This would allow you to do filtering and forwarding to ES ingest node pipeline as well.

Indentation in your config files seems to be pretty off. This a copy'n paste error?

---

<div class="post-metadata">

**Author:** ![Moep90](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/moep90/32/24143_2.png) [@Moep90](https://discuss.elastic.co/u/Moep90)\
**Post date:** [November 14, 2017, 4:32pm UTC](https://discuss.elastic.co/t/question-is-output-routing-possible-in-filebeat/107419/3 "2017-11-14T16:32:36Z")

</div>

Yeah the wrong indentation comes from the quote method.

Whats the schedule on this feature?

From what I understood now is, that I've to define a logstash filter which selects a filter from the "field.type" or something else... Am I right?

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [November 15, 2017, 2:34pm UTC](https://discuss.elastic.co/t/question-is-output-routing-possible-in-filebeat/107419/4 "2017-11-15T14:34:55Z")

</div>

> Whats the schedule on this feature?

Which feature? Event routing?

---

<div class="post-metadata">

**Author:** ![Moep90](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/moep90/32/24143_2.png) [@Moep90](https://discuss.elastic.co/u/Moep90)\
**Post date:** [November 15, 2017, 2:46pm UTC](https://discuss.elastic.co/t/question-is-output-routing-possible-in-filebeat/107419/5 "2017-11-15T14:46:34Z")

</div>

Sure..

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [November 15, 2017, 2:50pm UTC](https://discuss.elastic.co/t/question-is-output-routing-possible-in-filebeat/107419/6 "2017-11-15T14:50:52Z")

</div>

There is no active discussion on implementing event routing in beats. Feel free to open an [enhancement request](https://github.com/elastic/beats/issues).

---

<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 13, 2017, 2:51pm UTC](https://discuss.elastic.co/t/question-is-output-routing-possible-in-filebeat/107419/7 "2017-12-13T14:51:01Z")

</div>

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