# Read remote file using file input

**URL:** <https://discuss.elastic.co/t/read-remote-file-using-file-input/207218>\
**Category:** Logstash\
**Created:** [November 9, 2019, 7:36pm UTC](https://discuss.elastic.co/t/read-remote-file-using-file-input/207218 "2019-11-09T19:36:52Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![niraj\_pandey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/niraj_pandey/32/44034_2.png) [@niraj\_pandey](https://discuss.elastic.co/u/niraj_pandey)\
**Post date:** [November 9, 2019, 7:36pm UTC](https://discuss.elastic.co/t/read-remote-file-using-file-input/207218/1 "2019-11-09T19:36:52Z")

</div>

Hi,

I want to read a remote file using input plugin but I am not able to find how to read it.  
Can you pls let me know if there is any way to read remote file through file or some other plugin.

PS: I do not want to install a separate logstash server on remote side to read the file.

Thanks  
Niraj

---

<div class="post-metadata">

**Author:** ![niraj\_pandey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/niraj_pandey/32/44034_2.png) [@niraj\_pandey](https://discuss.elastic.co/u/niraj_pandey)\
**Post date:** [November 9, 2019, 8:11pm UTC](https://discuss.elastic.co/t/read-remote-file-using-file-input/207218/2 "2019-11-09T20:11:18Z")

</div>

I am using grok as well in filter file and need to apply same grok on the remote input file as well.So I am not sure if filebeat would work on this case or not

---

<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:** [November 10, 2019, 6:49am UTC](https://discuss.elastic.co/t/read-remote-file-using-file-input/207218/3 "2019-11-10T06:49:54Z")

</div>

I would recommend installing Filebeat on the remote host and have it send the data to Logstash.

---

<div class="post-metadata">

**Author:** ![niraj\_pandey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/niraj_pandey/32/44034_2.png) [@niraj\_pandey](https://discuss.elastic.co/u/niraj_pandey)\
**Post date:** [November 11, 2019, 2:43am UTC](https://discuss.elastic.co/t/read-remote-file-using-file-input/207218/4 "2019-11-11T02:43:54Z")

</div>

Just want to check what about the filters(added on filter.conf)file) which I have already configured on logstash. Would that filter work with the file I will process through filebeat.  
Can I add the tags etc on that remote file through filebeat as well ?

---

<div class="post-metadata">

**Author:** ![niraj\_pandey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/niraj_pandey/32/44034_2.png) [@niraj\_pandey](https://discuss.elastic.co/u/niraj_pandey)\
**Post date:** [November 18, 2019, 7:53am UTC](https://discuss.elastic.co/t/read-remote-file-using-file-input/207218/5 "2019-11-18T07:53:23Z")

</div>

Is there any sincedb like concept in file. In case my daemon goes down how I'll ensure it should read the file from last location

---

<div class="post-metadata">

**Author:** ![niraj\_pandey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/niraj_pandey/32/44034_2.png) [@niraj\_pandey](https://discuss.elastic.co/u/niraj_pandey)\
**Post date:** [November 25, 2019, 7:23am UTC](https://discuss.elastic.co/t/read-remote-file-using-file-input/207218/6 "2019-11-25T07:23:50Z")

</div>

Any suggestion how we can allow filebeat to read the file from last read location instead of reading it from beginning incase we need to restart filebeat

---

<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:** [November 25, 2019, 2:50pm UTC](https://discuss.elastic.co/t/read-remote-file-using-file-input/207218/7 "2019-11-25T14:50:07Z")

</div>

filebeat will do that by default.

---

<div class="post-metadata">

**Author:** ![niraj\_pandey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/niraj_pandey/32/44034_2.png) [@niraj\_pandey](https://discuss.elastic.co/u/niraj_pandey)\
**Post date:** [November 26, 2019, 5:47am UTC](https://discuss.elastic.co/t/read-remote-file-using-file-input/207218/8 "2019-11-26T05:47:49Z")

</div>

Thanks

---

<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:** [December 24, 2019, 5:47am UTC](https://discuss.elastic.co/t/read-remote-file-using-file-input/207218/9 "2019-12-24T05:47:53Z")

</div>

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