# Can I change default port of Filebeat "5044" to someother port

**URL:** <https://discuss.elastic.co/t/can-i-change-default-port-of-filebeat-5044-to-someother-port/197039>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 28, 2019, 6:23am UTC](https://discuss.elastic.co/t/can-i-change-default-port-of-filebeat-5044-to-someother-port/197039 "2019-08-28T06:23:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![priya94](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@priya94](https://discuss.elastic.co/u/priya94)\
**Post date:** [August 28, 2019, 6:23am UTC](https://discuss.elastic.co/t/can-i-change-default-port-of-filebeat-5044-to-someother-port/197039/1 "2019-08-28T06:23:34Z")

</div>

Hi All,  
I am new to ELK  
I am trying to run multiple filebeat instances on same machine to send different logs to logstash,then i am sending the logs to elasticserach with different index name.

But Logstash is not recognizing different filebeat input,So i want to change my default port of each flebeat,so that i can configure input beat as different port.

Can anyone please tell a way to change the port of filebeat,  
else let me know someother approach to achieve this.

Thanks and Regards,  
VishnuPriya

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [August 28, 2019, 6:53am UTC](https://discuss.elastic.co/t/can-i-change-default-port-of-filebeat-5044-to-someother-port/197039/2 "2019-08-28T06:53:13Z")

</div>

Can you not just add a field to the Filebeat config and use that to identify data?

---

<div class="post-metadata">

**Author:** ![priya94](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@priya94](https://discuss.elastic.co/u/priya94)\
**Post date:** [August 28, 2019, 7:04am UTC](https://discuss.elastic.co/t/can-i-change-default-port-of-filebeat-5044-to-someother-port/197039/3 "2019-08-28T07:04:25Z")

</div>

Thanks for replying Christian\_Dahlqvist,

This is my filebeat input,Where i should configure extra field,

#=========================== Filebeat inputs  
filebeat.inputs:

- type: log  
enabled: True  
paths:
  - /var/century/logs/\*.out

#================================ Outputs ========  
output.logstash:  
enabled: true  
hosts: ["XX.XX.XX.XX:5044"]

* * *

And if I am configuring extra field how can i filter that in logstash,below is my logstash configuration,

input {  
beats {  
port =\> 5044  
}  
}  
output {  
elasticsearch {  
hosts =\> ["[http://XX.XX.XX.XX:9200](http://XX.XX.XX.XX:9200)"]  
user =\> "elastic"  
password =\> "changeme"  
sniffing =\> true  
manage\_template =\> true  
index =\> "cmlogs"  
document\_type =\> "cmlogs"  
}  
stdout  
{  
codec =\>rubydebug  
}  
}

---

<div class="post-metadata">

**Author:** ![priya94](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@priya94](https://discuss.elastic.co/u/priya94)\
**Post date:** [August 28, 2019, 7:07am UTC](https://discuss.elastic.co/t/can-i-change-default-port-of-filebeat-5044-to-someother-port/197039/4 "2019-08-28T07:07:06Z")

</div>

Other filebeat is having the same configuration, only the log path is differs

---

<div class="post-metadata">

**Author:** ![priya94](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@priya94](https://discuss.elastic.co/u/priya94)\
**Post date:** [August 28, 2019, 9:35am UTC](https://discuss.elastic.co/t/can-i-change-default-port-of-filebeat-5044-to-someother-port/197039/5 "2019-08-28T09:35:32Z")

</div>

Thanks Christian\_Dahlqvist for your support,I tried using Fields in filebeat.It worked for me,

Below is the configuration which worked for me,

**Filebeat 1:**  
------Filebeat inputs ----------

filebeat.inputs:

- type: log  
enabled: True  
paths:
  - /var/century/cmui/logs/\*.out  
fields: {log\_type: cm}  
---- Logstash output -----  
output.logstash:  
enabled: true  
hosts: ["XX.XX.XX.XX:5044"]

**Filebeat 2:**  
------Filebeat inputs ----------

filebeat.inputs:

- type: log  
enabled: True  
paths:
  - /var/century/centuryui/logs/\*.out  
fields: {log\_type: century}  
---- Logstash output -----  
output.logstash:  
enabled: true  
hosts: ["XX.XX.XX.XX:5044"]

* * *

**LOGSTASH CONFIGURATION**

input {  
beats {  
port =\> 5044  
}  
}  
output {  
elasticsearch {  
hosts =\> ["[http://XX.XX.XX.XX:9200](http://XX.XX.XX.XX:9200)"]  
user =\> "elastic"  
password =\> "changeme"  
sniffing =\> true  
manage\_template =\> true  
index =\> "%{[fields][log\_type]}-logs"  
}  
stdout  
{  
codec =\>rubydebug  
}  
}

* * *

My logs are created intwo different index named cm-logs and century-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:** [September 25, 2019, 9:35am UTC](https://discuss.elastic.co/t/can-i-change-default-port-of-filebeat-5044-to-someother-port/197039/6 "2019-09-25T09:35:33Z")

</div>

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