# File Input, just one file, with one line that is updated every 5 minutes

**URL:** https://discuss.elastic.co/t/file-input-just-one-file-with-one-line-that-is-updated-every-5-minutes/294074
**Category:** Logstash
**Created:** [January 11, 2022, 6:59pm UTC](https://discuss.elastic.co/t/file-input-just-one-file-with-one-line-that-is-updated-every-5-minutes/294074 "2022-01-11T18:59:04Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ElasticLiver](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticliver/32/64869_2.png) [@ElasticLiver](https://discuss.elastic.co/u/ElasticLiver)
#### Post date: [January 11, 2022, 6:59pm UTC](https://discuss.elastic.co/t/file-input-just-one-file-with-one-line-that-is-updated-every-5-minutes/294074/1 "2022-01-11T18:59:04Z")

</div>

Hi, I need to read from logstash one file: `number_of_connections.txt`  
this file is updated every 5 minutes with a new number, so no new lines are added.

can I do this with file input? if not is there another input that I can use?

Thanks!

---

<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: [January 11, 2022, 11:56pm UTC](https://discuss.elastic.co/t/file-input-just-one-file-with-one-line-that-is-updated-every-5-minutes/294074/2 "2022-01-11T23:56:05Z")

</div>

You could use a file input in read mode and have the input delete the file every time it is read. Provided your filesystem does not keep re-using the same inode that might work.

---

<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: [February 8, 2022, 11:56pm UTC](https://discuss.elastic.co/t/file-input-just-one-file-with-one-line-that-is-updated-every-5-minutes/294074/3 "2022-02-08T23:56:37Z")

</div>

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