# How to make beats send data to multiple instances

**URL:** https://discuss.elastic.co/t/how-to-make-beats-send-data-to-multiple-instances/308785
**Category:** Beats
**Tags:** filebeat
**Created:** [July 4, 2022, 7:57am UTC](https://discuss.elastic.co/t/how-to-make-beats-send-data-to-multiple-instances/308785 "2022-07-04T07:57:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Santhosh\_Kumar247](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/santhosh_kumar247/32/107885_2.png) [@Santhosh\_Kumar247](https://discuss.elastic.co/u/Santhosh_Kumar247)
#### Post date: [July 4, 2022, 7:57am UTC](https://discuss.elastic.co/t/how-to-make-beats-send-data-to-multiple-instances/308785/1 "2022-07-04T07:57:12Z")

</div>

Hello,

I have the following setting in the filebeats.yml:  
Two conditions input for logs

```auto
filebeat.inputs:
- paths:
    - E: \ log_type1 _ *. Log
  fields_under_root: true
  fields:
    type: type1

- paths:
    - E: \ log_type2 _ *. Log
  fields_under_root: true
  fields:
    type: type2

```

And in my logstash I have two pipelines “pipeline\_type1.conf” in port 9601 and “pipeline\_type2.conf” in port 9602.

I'd like to know if it's possible set in filebeats.yml two outputs like

```auto
If (type = ‘type1’)
output.logstash:
  hosts: ["localhost: 9601"]
If (type = ‘type2’)
output.logstash:
  hosts: ["localost: 9602"]

```

Or send all data for both ports, and in the pipeline's filter include an if for each type.

If there is no solution like those, I thought in include one more filebeat agent and each one has its output.

---

<div class="post-metadata">

### Author: ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)
#### Post date: [July 4, 2022, 12:03pm UTC](https://discuss.elastic.co/t/how-to-make-beats-send-data-to-multiple-instances/308785/2 "2022-07-04T12:03:39Z")

</div>

Hey @Santhosh_Kumar247, welcome to discuss 🙂

It is not possible to use multiple outputs with the same beat. The only option would be what you said to use multiple filebeats, with the same configuration, but each one with its own output.

In your case you also have different inputs, so I would suggest to configure multiple Filebeat instances, each one to collect and send each type of logs.

---

<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: [August 1, 2022, 2:03pm UTC](https://discuss.elastic.co/t/how-to-make-beats-send-data-to-multiple-instances/308785/3 "2022-08-01T14:03:54Z")

</div>

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