# Can we configure logstash to listen only to a paricular set of hosts

**URL:** <https://discuss.elastic.co/t/can-we-configure-logstash-to-listen-only-to-a-paricular-set-of-hosts/261049>\
**Category:** Logstash\
**Created:** [January 13, 2021, 8:30pm UTC](https://discuss.elastic.co/t/can-we-configure-logstash-to-listen-only-to-a-paricular-set-of-hosts/261049 "2021-01-13T20:30:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![prashant\_Rajenderan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prashant_rajenderan/32/82035_2.png) [@prashant\_Rajenderan](https://discuss.elastic.co/u/prashant_Rajenderan)\
**Post date:** [January 13, 2021, 8:30pm UTC](https://discuss.elastic.co/t/can-we-configure-logstash-to-listen-only-to-a-paricular-set-of-hosts/261049/1 "2021-01-13T20:30:33Z")

</div>

Currently my logstash input is listening to filebeat on port XXXX,my requirement is to collect log data only from a particular hosts(let's say only from Webservers). I dont want to modify the filebeat configuration directly on to the servers but I want allow only the webservers logs to listen in.

Could anyone suggest how to configure the logstash in this scenario? Following is mylogstash input configuration.

```auto
input {
  beats {
    port => 50XX
  }
}

```

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [January 13, 2021, 8:47pm UTC](https://discuss.elastic.co/t/can-we-configure-logstash-to-listen-only-to-a-paricular-set-of-hosts/261049/2 "2021-01-13T20:47:34Z")

</div>

Which part of my answer on StackOverflow did you not get?

---

<div class="post-metadata">

**Author:** ![prashant\_Rajenderan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prashant_rajenderan/32/82035_2.png) [@prashant\_Rajenderan](https://discuss.elastic.co/u/prashant_Rajenderan)\
**Post date:** [January 13, 2021, 9:21pm UTC](https://discuss.elastic.co/t/can-we-configure-logstash-to-listen-only-to-a-paricular-set-of-hosts/261049/3 "2021-01-13T21:21:32Z")

</div>

Hi Badger, Thanks a ton!! Got it, It was a miss from my end on the CSV file side. Finally I am able to sort it 🙂

---

<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:** [February 10, 2021, 9:21pm UTC](https://discuss.elastic.co/t/can-we-configure-logstash-to-listen-only-to-a-paricular-set-of-hosts/261049/4 "2021-02-10T21:21:43Z")

</div>

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