# Filebeat detects file but keeps offset in 0

**URL:** <https://discuss.elastic.co/t/filebeat-detects-file-but-keeps-offset-in-0/66248>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [November 16, 2016, 1:25pm UTC](https://discuss.elastic.co/t/filebeat-detects-file-but-keeps-offset-in-0/66248 "2016-11-16T13:25:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![txisme](https://avatars.discourse-cdn.com/v4/letter/t/dbc845/32.png) [@txisme](https://discuss.elastic.co/u/txisme)\
**Post date:** [November 16, 2016, 1:25pm UTC](https://discuss.elastic.co/t/filebeat-detects-file-but-keeps-offset-in-0/66248/1 "2016-11-16T13:25:42Z")

</div>

Hey, recently i had a problem with elasticsearch where all shards were with RED flag. So i deleted everything from ES, deleted registry of filebeat and restarted everything.

Right now the data is not being indexed in ES, i checked the registry file of filebeat and it shows all files opened but with offset as 0 in all files.

What can be causing this?

EDIT: Also there is no filebeat log file generated as before.

---

<div class="post-metadata">

**Author:** ![txisme](https://avatars.discourse-cdn.com/v4/letter/t/dbc845/32.png) [@txisme](https://discuss.elastic.co/u/txisme)\
**Post date:** [November 16, 2016, 2:55pm UTC](https://discuss.elastic.co/t/filebeat-detects-file-but-keeps-offset-in-0/66248/2 "2016-11-16T14:55:18Z")

</div>

Dont know why but when i tried to run logstash directly from bin folder instead of running it as a service it worked. This is so weird.

EDIT: Back to square one, i reinstalled ES, LS and FileBeat, started working good, got to a moment where it stopped processing logs. Again, deleted everything, restarted and now back to not processing anything ☹

can someone please help me?

EDIT2:  
OK, so i found out that if i stop one specific filebeat prospector, everything works ok. This prospector in specific is harvesting a 5GB log file, any chance this is breaking ELK?

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [November 17, 2016, 9:05am UTC](https://discuss.elastic.co/t/filebeat-detects-file-but-keeps-offset-in-0/66248/3 "2016-11-17T09:05:10Z")

</div>

Could you share your config file and some log outputs from filebeat? Which version os filebeat, ls, es are you using?

---

<div class="post-metadata">

**Author:** ![txisme](https://avatars.discourse-cdn.com/v4/letter/t/dbc845/32.png) [@txisme](https://discuss.elastic.co/u/txisme)\
**Post date:** [November 17, 2016, 10:20am UTC](https://discuss.elastic.co/t/filebeat-detects-file-but-keeps-offset-in-0/66248/4 "2016-11-17T10:20:37Z")

</div>

Filebeat 1.3  
Logstash 1.4  
ElasticSearch 2.4

Filebeat prospector config:

```
    -
  paths:
    - "/root/tracy/logs/*.out"
  input_type: log

  fields:
    log_type: tracy

  multiline:
    pattern: '^Offset'
    negate: true
    match: after

```

Filebeat Log:  
It doesnt even create a log file

Logstash config:

```
input {
    beats{
            port => 5044
    }
}
filter{
 if([fields][log_type]=="tracy"){
            grok{
                    match => {"message" => "(?m)%{WORD:check} = %{NUMBER:offset2:int}, %{WORD} = %{WORD:topic2}, %{WORD} = %{WORD:source2}, %{WORD} = %{WORD:type2}, %{WORD} = %{GREEDYDATA:value2}"}
            }
    }
}
output {
     if([fields][log_type]=="tracy"){
            elasticsearch{
                    hosts => ["localhost:9200"]
                    index => ["tracy"]
            }
}

```

Logstash Log:

```
Sending logstash logs to /var/log/logstash/logstash.log.
{:timestamp=>"2016-11-17T00:11:50.044000+0000", :message=>"Pipeline main started"}
```

---

<div class="post-metadata">

**Author:** ![txisme](https://avatars.discourse-cdn.com/v4/letter/t/dbc845/32.png) [@txisme](https://discuss.elastic.co/u/txisme)\
**Post date:** [November 17, 2016, 10:34am UTC](https://discuss.elastic.co/t/filebeat-detects-file-but-keeps-offset-in-0/66248/5 "2016-11-17T10:34:22Z")

</div>

Ok, i found the problem.

I was sending the output to ElasticSearch and to a fileoutput, it was that that was slowing down everything.

---

<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:** [December 15, 2016, 10:34am UTC](https://discuss.elastic.co/t/filebeat-detects-file-but-keeps-offset-in-0/66248/6 "2016-12-15T10:34:36Z")

</div>

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