# Configure Logstash to accept data from one host location to another host location

**URL:** <https://discuss.elastic.co/t/configure-logstash-to-accept-data-from-one-host-location-to-another-host-location/75563>\
**Category:** Logstash\
**Created:** [February 17, 2017, 9:42pm UTC](https://discuss.elastic.co/t/configure-logstash-to-accept-data-from-one-host-location-to-another-host-location/75563 "2017-02-17T21:42:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mani2451](https://avatars.discourse-cdn.com/v4/letter/m/dfb087/32.png) [@Mani2451](https://discuss.elastic.co/u/Mani2451)\
**Post date:** [February 17, 2017, 9:42pm UTC](https://discuss.elastic.co/t/configure-logstash-to-accept-data-from-one-host-location-to-another-host-location/75563/1 "2017-02-17T21:42:50Z")

</div>

Hi,  
i am trying to configure logstash by accepting data from one host location i.e [xyz1.com](http://xyz1.com) to [xyz2.com](http://xyz2.com) and the xyz 1 has a log which needs to be sent to xyz2 and then it should be parsed . Since i'm able to see that input file only takes the log files which are located inside the same host .

Just an example to show that /var/log/apache/access.log is located in [xyz2.com](http://xyz2.com) and this is the only solution which i got as of now and i want /var/log/message.log from [xyz1.com](http://xyz1.com) location to be sent to xyz2 location and get parsed !

reference for xyz2:  
input {  
file {  
path =\> "/var/log/apache/access.log"  
type =\> "apache-access"  
}  
}

So , can you please help me in specifying the path which i should give in xyz2 host location in order to access the xyz1 host log file ?

---

<div class="post-metadata">

**Author:** ![jkuang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jkuang/32/72637_2.png) [@jkuang](https://discuss.elastic.co/u/jkuang)\
**Post date:** [February 18, 2017, 12:27am UTC](https://discuss.elastic.co/t/configure-logstash-to-accept-data-from-one-host-location-to-another-host-location/75563/2 "2017-02-18T00:27:20Z")

</div>

I would recommend using Filebeat to ship the file over from [xyz2.com](http://xyz2.com) to where your Logstash is (xyz1).

Here are some instructions that I find helpful in getting this setup.

[https://www.elastic.co/guide/en/beats/filebeat/current/config-filebeat-logstash.html](https://www.elastic.co/guide/en/beats/filebeat/current/config-filebeat-logstash.html)

or

[http://www.tecmint.com/install-elasticsearch-logstash-and-kibana-elk-stack-on-centos-rhel-7/](http://www.tecmint.com/install-elasticsearch-logstash-and-kibana-elk-stack-on-centos-rhel-7/)

Some Linux commands will be different if you're not using Centos 7.

---

<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 22, 2017, 6:36am UTC](https://discuss.elastic.co/t/configure-logstash-to-accept-data-from-one-host-location-to-another-host-location/75563/3 "2017-02-22T06:36:21Z")

</div>

> So , can you please help me in specifying the path which i should give in xyz2 host location in order to access the xyz1 host log file ?

The already suggested solution of using Filebeat to ship the files is good. Logstash's file input (and Filebeat) can only read files in mounted file systems. Theoretically you could mount another host's log files via e.g. NFS, but that's not recommended.

---

<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 22, 2017, 6:36am UTC](https://discuss.elastic.co/t/configure-logstash-to-accept-data-from-one-host-location-to-another-host-location/75563/4 "2017-03-22T06:36:29Z")

</div>

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