# Logstash to read from multiple server filebeat

**URL:** <https://discuss.elastic.co/t/logstash-to-read-from-multiple-server-filebeat/119239>\
**Category:** Logstash\
**Created:** [February 9, 2018, 1:05pm UTC](https://discuss.elastic.co/t/logstash-to-read-from-multiple-server-filebeat/119239 "2018-02-09T13:05:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sridhar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sridhar/32/64860_2.png) [@Sridhar](https://discuss.elastic.co/u/Sridhar)\
**Post date:** [February 9, 2018, 1:05pm UTC](https://discuss.elastic.co/t/logstash-to-read-from-multiple-server-filebeat/119239/1 "2018-02-09T13:05:02Z")

</div>

Hi All,  
below is the file beat I'm configuring in one server with port 5044

## filebeat:

prospectors:  
- paths:  
- /path/to/logs/router-00 **1** -yyyymmdd.log  
include: "Read from QMANGER:INPUT\_IN"  
fields: {log\_type: input\_interface}  
-  
paths:  
- /path/to/logs/router-00 **2** -yyyymmdd.log  
include: "Write on QMANGER:OUTPUT\_OUT"  
fields: {log\_type: output\_interface}

## Logstash: config file

input {  
beats {  
port =\> 5044  
}  
}  
filter {  
if [fields][log\_type] == "input\_interface" {  
mutate {  
add\_field =\> { "foo" =\> "var" }  
}  
}  
if [fields][log\_type] == "output\_interface" {  
mutate {  
add\_field =\> { "foo" =\> "var" }  
}  
}  
}

## the above will work for one server log files, if I want to get logs from another servers.. how should I configure logstash conf file.?

Please help..  
Thanks,  
Sridhar. B

---

<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:** [February 9, 2018, 1:11pm UTC](https://discuss.elastic.co/t/logstash-to-read-from-multiple-server-filebeat/119239/2 "2018-02-09T13:11:23Z")

</div>

Unless you want to filter those log messages differently (or send them to different outputs) you don't have to do anything.

---

<div class="post-metadata">

**Author:** ![Sridhar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sridhar/32/64860_2.png) [@Sridhar](https://discuss.elastic.co/u/Sridhar)\
**Post date:** [February 9, 2018, 1:17pm UTC](https://discuss.elastic.co/t/logstash-to-read-from-multiple-server-filebeat/119239/3 "2018-02-09T13:17:05Z")

</div>

> [@magnusbaeck](#):
>
> or send them to different outputs

Hi,

yes, in my case I should do the both..

I have to filter them and send them to another ES indies.

Please help..

---

<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:** [February 9, 2018, 2:24pm UTC](https://discuss.elastic.co/t/logstash-to-read-from-multiple-server-filebeat/119239/4 "2018-02-09T14:24:09Z")

</div>

See for example [https://stackoverflow.com/a/27147688/414355](https://stackoverflow.com/a/27147688/414355). The topic has also been discussed here many many times before.

---

<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:** [March 9, 2018, 2:24pm UTC](https://discuss.elastic.co/t/logstash-to-read-from-multiple-server-filebeat/119239/5 "2018-03-09T14:24:38Z")

</div>

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