{"action":"opened","issue":{"url":"https://api.github.com/repos/logstash-plugins/logstash-input-file/issues/72","labels_url":"https://api.github.com/repos/logstash-plugins/logstash-input-file/issues/72/labels{/name}","comments_url":"https://api.github.com/repos/logstash-plugins/logstash-input-file/issues/72/comments","events_url":"https://api.github.com/repos/logstash-plugins/logstash-input-file/issues/72/events","html_url":"https://github.com/logstash-plugins/logstash-input-file/issues/72","id":113183422,"number":72,"title":"New but unprocessed files will be read from the end after a logstash restart","user":{"login":"koendc","id":813800,"avatar_url":"https://avatars.githubusercontent.com/u/813800?v=3","gravatar_id":"","url":"https://api.github.com/users/koendc","html_url":"https://github.com/koendc","followers_url":"https://api.github.com/users/koendc/followers","following_url":"https://api.github.com/users/koendc/following{/other_user}","gists_url":"https://api.github.com/users/koendc/gists{/gist_id}","starred_url":"https://api.github.com/users/koendc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koendc/subscriptions","organizations_url":"https://api.github.com/users/koendc/orgs","repos_url":"https://api.github.com/users/koendc/repos","events_url":"https://api.github.com/users/koendc/events{/privacy}","received_events_url":"https://api.github.com/users/koendc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-24T21:12:42Z","updated_at":"2015-10-24T21:12:42Z","closed_at":null,"body":"### Scenario\r\n1. Logstash is configured to read from files from the end and logstash is running in a 'blocked' mode with no output.\r\n2. A new file that logstash is supposed to monitor, is created\r\n3. Logstash is restarted\r\n\r\n### Issue\r\nNow you would expect that logstash will process the file from the beginning. That's not the case: after the restart, the file is monitored at the end.\r\n\r\n### Use case\r\nI encountered this issue while processing log files. Logstash was halted because of back pressure by rabbitmq. The logfile got rotated. After a restart I noticed that the new log file was being consumed from the very end, so all logs that were there from before the restart, were discarded.\r\n\r\n### Reproduce\r\nA test script that reproduce the issue can be found here: https://gist.github.com/koendc/75b634b719bc8ef40ca5\r\n\r\n### As a possible solution\r\nAdd the 0 position to the sincedb file from the moment a new file is begin tracked?\r\n"}}