# Filebeats can see new lines in file only after restart

**URL:** <https://discuss.elastic.co/t/filebeats-can-see-new-lines-in-file-only-after-restart/281159>\
**Category:** Beats\
**Tags:** docker, filebeat\
**Created:** [August 12, 2021, 6:48am UTC](https://discuss.elastic.co/t/filebeats-can-see-new-lines-in-file-only-after-restart/281159 "2021-08-12T06:48:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![station72](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/station72/32/92032_2.png) [@station72](https://discuss.elastic.co/u/station72)\
**Post date:** [August 12, 2021, 6:48am UTC](https://discuss.elastic.co/t/filebeats-can-see-new-lines-in-file-only-after-restart/281159/1 "2021-08-12T06:48:13Z")

</div>

I have a log file. It named access.log  
Each 30min new lines appears in this file from remote server (by synchronization).

My filebeat config

```auto
filebeat.inputs:
- type: filestream
  scan_frequency: 10s
  paths:
    - /srv/logs/preprod/nginx/access.log

output.logstash:
 hosts: ["logstash:5044"]

logging.level: info
logging.to_files: true
logging.files:
  path: /var/log/filebeat
  name: filebeat
  keepfiles: 7
  permissions: 0777

```

Filebeat works from docker container

```auto
  filebeat:
    image: docker.elastic.co/beats/filebeat:7.10.1
    user: root
    volumes:
      - /srv/inc/data/filebeat/data:/usr/share/filebeat/data
      - ./filebeat/configs/filebeat.yml:/usr/share/filebeat/filebeat.yml
      - /srv/logs/preprod/nginx/access.log:/srv/logs/preprod/nginx/access.log
      - /var/log/filebeat:/var/log/filebeat
    command: ["--strict.perms=false"]
    deploy:
      mode: global

```

I can get new lines of log in elasticsearch only after restarting filebeat container.  
How can i get new lines without restarting?

Logs from Filebeat

```auto
2021-08-12T06:47:02.707Z	INFO	[file_watcher]	filestream/fswatch.go:131	Start next scan
2021-08-12T06:47:12.707Z	INFO	[file_watcher]	filestream/fswatch.go:131	Start next scan
2021-08-12T06:47:22.707Z	INFO	[file_watcher]	filestream/fswatch.go:131	Start next scan
2021-08-12T06:47:32.707Z	INFO	[file_watcher]	filestream/fswatch.go:131	Start next scan

```

and nothing else

---

<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:** [September 9, 2021, 8:49am UTC](https://discuss.elastic.co/t/filebeats-can-see-new-lines-in-file-only-after-restart/281159/2 "2021-09-09T08:49:01Z")

</div>

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