# How to configure filebeat and logstash? 3 VMs

**URL:** <https://discuss.elastic.co/t/how-to-configure-filebeat-and-logstash-3-vms/140748>\
**Category:** Logstash\
**Created:** [July 19, 2018, 1:59pm UTC](https://discuss.elastic.co/t/how-to-configure-filebeat-and-logstash-3-vms/140748 "2018-07-19T13:59:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![saisimo02](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@saisimo02](https://discuss.elastic.co/u/saisimo02)\
**Post date:** [July 19, 2018, 1:59pm UTC](https://discuss.elastic.co/t/how-to-configure-filebeat-and-logstash-3-vms/140748/1 "2018-07-19T13:59:24Z")

</div>

Hello,  
I have 3 VMs and I would like to install logstash locally and filebeat in each VM.  
I installed filebeat and my filebeat.yml is

```
filebeat.prospectors:
- input_type: log
paths:
- /path/*.xml
# scan_frequency: 60s
document_type: message
multiline.pattern: '^<measInfo'
multiline.negate: true
multiline.match: after
output.logstash:
    hosts:["my_ip_address:5044"]

```

I did the same thing for 2 others VM  
My logstash.conf (running locally) is:

```
input{
    beats{
    port=>5044
    host=>"ip_address_of_VM"
}}

```

I run logstash locally and then the filebeat in the VM1 but I get this message error:

> Failed to connect: dial tcp my\_ip\_address:5044: getsockopt: connection refused

It's the correct way? and how I can resolve this problem? Thank you

---

<div class="post-metadata">

**Author:** ![pge](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pge/32/32641_2.png) [@pge](https://discuss.elastic.co/u/pge)\
**Post date:** [July 19, 2018, 2:19pm UTC](https://discuss.elastic.co/t/how-to-configure-filebeat-and-logstash-3-vms/140748/2 "2018-07-19T14:19:16Z")

</div>

Hi @saisimo02,  
what operating system are you using on your vms?

Did you also check:

1. firewall status
2. listening ip/ports
3. (if linux: selinux )

---

<div class="post-metadata">

**Author:** ![saisimo02](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@saisimo02](https://discuss.elastic.co/u/saisimo02)\
**Post date:** [July 19, 2018, 2:22pm UTC](https://discuss.elastic.co/t/how-to-configure-filebeat-and-logstash-3-vms/140748/3 "2018-07-19T14:22:00Z")

</div>

Hi It's working now I am using the local\_IP also ( input logstash.conf).

---

<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 16, 2018, 2:22pm UTC](https://discuss.elastic.co/t/how-to-configure-filebeat-and-logstash-3-vms/140748/4 "2018-08-16T14:22:01Z")

</div>

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