# Reading the log file from the last read position

**URL:** <https://discuss.elastic.co/t/reading-the-log-file-from-the-last-read-position/188131>\
**Category:** Logstash\
**Created:** [June 29, 2019, 7:20am UTC](https://discuss.elastic.co/t/reading-the-log-file-from-the-last-read-position/188131 "2019-06-29T07:20:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jatin6418](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jatin6418](https://discuss.elastic.co/u/jatin6418)\
**Post date:** [June 29, 2019, 7:20am UTC](https://discuss.elastic.co/t/reading-the-log-file-from-the-last-read-position/188131/1 "2019-06-29T07:20:59Z")

</div>

Hey i am working on data visulization using kibana.  
So for that i am reading my log file using logstash but my problem is whenever i click on refresh button in kibana whole log file is read again. But i want to read the log file from the last read position that is i want to read the newely inserted records.

Need urgent help!!!!!!!!!!!!

I am attaching the code my config file below:

input{

```
 file{
     type => "log"
     path =>"/home/dummy.log"
     start_position =>"beginning"
     sincedb_path => "/dev/null"
     }

```

}

filter {

grok {  
match =\> [  
"message","(?[\d-]+)\s(?[\d:]+),(?[\w]+):(?[\w-/]+)"  
]  
}

}

output {  
elasticsearch {  
host =\> "localhost"  
index=\> "dummy"  
document\_type =\> "dummy\_sample"  
}

}

---

<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:** [June 29, 2019, 7:38am UTC](https://discuss.elastic.co/t/reading-the-log-file-from-the-last-read-position/188131/2 "2019-06-29T07:38:52Z")

</div>

> [@jatin6418](#):
>
> sincedb\_path =\> "/dev/null"

This means that the full file will be reread every time Logstash restarts.

---

<div class="post-metadata">

**Author:** ![jatin6418](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jatin6418](https://discuss.elastic.co/u/jatin6418)\
**Post date:** [June 29, 2019, 11:42am UTC](https://discuss.elastic.co/t/reading-the-log-file-from-the-last-read-position/188131/3 "2019-06-29T11:42:08Z")

</div>

can u tell me the  
sincedb\_path =\> " "  
In order to solve this issue

---

<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:** [July 27, 2019, 11:42am UTC](https://discuss.elastic.co/t/reading-the-log-file-from-the-last-read-position/188131/4 "2019-07-27T11:42:22Z")

</div>

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