# Why Filebeat resend previous log when I add new content in log file?

**URL:** https://discuss.elastic.co/t/why-filebeat-resend-previous-log-when-i-add-new-content-in-log-file/124500
**Category:** Beats
**Tags:** filebeat
**Created:** [March 19, 2018, 8:42am UTC](https://discuss.elastic.co/t/why-filebeat-resend-previous-log-when-i-add-new-content-in-log-file/124500 "2018-03-19T08:42:19Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![leyi1002](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@leyi1002](https://discuss.elastic.co/u/leyi1002)
#### Post date: [March 19, 2018, 8:42am UTC](https://discuss.elastic.co/t/why-filebeat-resend-previous-log-when-i-add-new-content-in-log-file/124500/1 "2018-03-19T08:42:20Z")

</div>

I hava no idea why filebeat send all content of log,but not new content.Thanks for your help!

filebeat.yml

```auto
filebeat.prospectors:

- type: log

  enabled: true

  paths:
    - /usr/local/logstash/sample/line.log
  fields:
    type: syslog  

#============================= Filebeat modules ===============================

filebeat.config.modules:
  path: ${path.config}/modules.d/*.yml
  reload.enabled: false

#==================== Elasticsearch template setting ==========================

setup.template.settings:
  index.number_of_shards: 3

setup.template.name: "filebeat-jay"
setup.template.pattern: "filebeat-jay-*"
setup.kibana:

  host: "localhost:5601"
  username: "elastic"
  password: "elastic"

#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
  # Array of hosts to connect to.
  hosts: ["localhost:9201"]
  index: "filebeat-jay-%{[beat.version]}-%{+yyyy.MM.dd}"
  indices: 
    - index: "filebeat-jay-debug-%{[beat.version]}-%{+yyyy.MM.dd}" 
      when.contains:
        message: "debug"
    - index: "filebeat-jay-err-%{[beat.version]}-%{+yyyy.MM.dd}"
      when.contains:
        message: "err"
  username: "elastic"
  password: "${ES_PWD}"

```

---

<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: [March 19, 2018, 9:24am UTC](https://discuss.elastic.co/t/why-filebeat-resend-previous-log-when-i-add-new-content-in-log-file/124500/2 "2018-03-19T09:24:02Z")

</div>

How are you adding new content to the log file?

---

<div class="post-metadata">

### Author: ![leyi1002](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@leyi1002](https://discuss.elastic.co/u/leyi1002)
#### Post date: [March 20, 2018, 7:13am UTC](https://discuss.elastic.co/t/why-filebeat-resend-previous-log-when-i-add-new-content-in-log-file/124500/3 "2018-03-20T07:13:53Z")

</div>

It resolved.I use vim to manually add content，so it causes this problem.Using echo will 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: [April 17, 2018, 7:14am UTC](https://discuss.elastic.co/t/why-filebeat-resend-previous-log-when-i-add-new-content-in-log-file/124500/4 "2018-04-17T07:14:08Z")

</div>

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