# How to sends logs from remote machine to Logstash or Elastic Search

**URL:** <https://discuss.elastic.co/t/how-to-sends-logs-from-remote-machine-to-logstash-or-elastic-search/239791>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [July 3, 2020, 11:44am UTC](https://discuss.elastic.co/t/how-to-sends-logs-from-remote-machine-to-logstash-or-elastic-search/239791 "2020-07-03T11:44:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pankaj0172](https://avatars.discourse-cdn.com/v4/letter/p/58f4c7/32.png) [@pankaj0172](https://discuss.elastic.co/u/pankaj0172)\
**Post date:** [July 3, 2020, 11:44am UTC](https://discuss.elastic.co/t/how-to-sends-logs-from-remote-machine-to-logstash-or-elastic-search/239791/1 "2020-07-03T11:44:14Z")

</div>

Hi There,

I have installed Elasticsearch, Logstash, and Kibana (Elastic Stack) on Ubuntu 18.04 as suggested in the below article and everything configured correctly..

> **[How To Install Elasticsearch, Logstash, and Kibana (Elastic Stack) on Ubuntu...](https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elastic-stack-on-ubuntu-18-04)**
>
> In this tutorial, we will go over the installation of the Elastic Stack on an Ubuntu 18.04 server. You will learn how to install all the components of the Elastic Stack (including Filebeat, a Beat used for forwarding and centralizing logs and files)...

But I have installed metric beat on the remote windows server and configured the metricbeat .yaml files, started the service but while connecting to Logstah server from a remote windows machine within same network to sends system metric logs and but its not sending and giving error as an attached snapshot.

As listen Logstash & Elastic Search only listening localhost might be the caused this issue but tried to change it local to IP address but to able to change it. Can someone please guide me to get this done.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/5/d549f38f07fd7d1a1d7e6247c439e392e7c048b0.png)

Basically I want to achieve this for each machine in my network..

![image](https://us1.discourse-cdn.com/elastic/original/3X/4/f/4f671d55a3021801bc6a3b7ef36aceaa2d2443d7.png)

Below is the metric.Yaml config file...  
'''

# ================================= Dashboards =================================

# These settings control loading the sample dashboards to the Kibana index. Loading

# the dashboards is disabled by default and can be enabled either by setting the

# options here or by using the `setup` command.

setup.dashboards.enabled: true

# =================================== Kibana ===================================

# Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API.

# This requires a Kibana endpoint configuration.

setup.kibana:

# Kibana Host

# Scheme and port can be left out and will be set to the default (http and 5601)

# In case you specify and additional path, the scheme is required: [http://localhost:5601/path](http://localhost:5601/path)

# IPv6 addresses should always be defined as: https://[2001:db8::1]:5601

host: "10.0.0.4:80"

# ---------------------------- Elasticsearch Output ----------------------------

output.elasticsearch:

# Array of hosts to connect to.

#hosts: ["localhost:9200"]

# Protocol - either `http` (default) or `https`.

#protocol: "https"

# Authentication credentials - either API key or username/password.

#api\_key: "id:api\_key"  
#username: "elastic"  
#password: "changeme"

# ------------------------------ Logstash Output -------------------------------

#output.logstash:

# The Logstash hosts

hosts: ["10.0.0.4:8443"]  
''''

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 3, 2020, 3:47pm UTC](https://discuss.elastic.co/t/how-to-sends-logs-from-remote-machine-to-logstash-or-elastic-search/239791/2 "2020-07-03T15:47:10Z")

</div>

You don't need Logstash. Just send to elasticsearch.

---

<div class="post-metadata">

**Author:** ![pankaj0172](https://avatars.discourse-cdn.com/v4/letter/p/58f4c7/32.png) [@pankaj0172](https://discuss.elastic.co/u/pankaj0172)\
**Post date:** [July 4, 2020, 2:22am UTC](https://discuss.elastic.co/t/how-to-sends-logs-from-remote-machine-to-logstash-or-elastic-search/239791/3 "2020-07-04T02:22:38Z")

</div>

Thanks for your response, apericate it. But my elastic search only listening on localhost not Lan ip and due to thisetricbeat is not able to connect from remote machine.. Can you help me to fix it?

---

<div class="post-metadata">

**Author:** ![Er.Sid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/er.sid/32/75992_2.png) [@Er.Sid](https://discuss.elastic.co/u/Er.Sid)\
**Post date:** [July 4, 2020, 6:15pm UTC](https://discuss.elastic.co/t/how-to-sends-logs-from-remote-machine-to-logstash-or-elastic-search/239791/4 "2020-07-04T18:15:14Z")

</div>

Hi Pankaj, I am also stuck at similar state. Did U find any solutin to Ur problem ?

---

<div class="post-metadata">

**Author:** ![pankaj0172](https://avatars.discourse-cdn.com/v4/letter/p/58f4c7/32.png) [@pankaj0172](https://discuss.elastic.co/u/pankaj0172)\
**Post date:** [July 6, 2020, 6:09am UTC](https://discuss.elastic.co/t/how-to-sends-logs-from-remote-machine-to-logstash-or-elastic-search/239791/5 "2020-07-06T06:09:34Z")

</div>

Hi Sid,

I have figure it out this issue and able to resolve it by changing configuration in elastic config file, Please comment this setting with # then try to connect from remote machine it would be working fine.

![image](https://us1.discourse-cdn.com/elastic/original/3X/e/6/e6f21c771ff87bfb875e19714c0b997412d40b5c.png)

---

<div class="post-metadata">

**Author:** ![Er.Sid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/er.sid/32/75992_2.png) [@Er.Sid](https://discuss.elastic.co/u/Er.Sid)\
**Post date:** [July 6, 2020, 7:23am UTC](https://discuss.elastic.co/t/how-to-sends-logs-from-remote-machine-to-logstash-or-elastic-search/239791/6 "2020-07-06T07:23:13Z")

</div>

Thanks Pankaj..I will check it out

---

<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 3, 2020, 9:23am UTC](https://discuss.elastic.co/t/how-to-sends-logs-from-remote-machine-to-logstash-or-elastic-search/239791/7 "2020-08-03T09:23:14Z")

</div>

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