# Filebeat Windows : no event when log file contains 1 line

**URL:** <https://discuss.elastic.co/t/filebeat-windows-no-event-when-log-file-contains-1-line/101133>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [September 20, 2017, 8:26am UTC](https://discuss.elastic.co/t/filebeat-windows-no-event-when-log-file-contains-1-line/101133 "2017-09-20T08:26:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Youkoulayley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youkoulayley/32/22316_2.png) [@Youkoulayley](https://discuss.elastic.co/u/Youkoulayley)\
**Post date:** [September 20, 2017, 8:26am UTC](https://discuss.elastic.co/t/filebeat-windows-no-event-when-log-file-contains-1-line/101133/1 "2017-09-20T08:26:41Z")

</div>

Hi,

I have filebeat installed on a WIndows machine. My file contain the result of a sql request. So the file is always truncated and contain either 0 line or 1 line.

But when the file contains just one line, filebeat doesn't send event. I see in the log file :

```auto
INFO Non-zero metrics in the last 30s: filebeat.harvester.closed=1 filebeat.harvester.files.truncated=1 filebeat.harvester.open_files=-1 filebeat.harvester.running=-1 publish.events=1 registrar.states.update=1 registrar.writes=1
2017-09-20T10:24:25+02:00 INFO No non-zero metrics in the last 30s
2017-09-20T10:24:41+02:00 INFO Harvester started for file: C:\temp\trace.txt

```

But when i add an empty line before or after the line I want the event is sent.

Do you know why ?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [September 20, 2017, 1:09pm UTC](https://discuss.elastic.co/t/filebeat-windows-no-event-when-log-file-contains-1-line/101133/2 "2017-09-20T13:09:14Z")

</div>

> [@Youkoulayley](#):
>
> But when i add an empty line before or after the line I want the event is sent.
> 
> Do you know why ?

Filebeat needs to read a newline to know that the log line is complete.

---

<div class="post-metadata">

**Author:** ![Youkoulayley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youkoulayley/32/22316_2.png) [@Youkoulayley](https://discuss.elastic.co/u/Youkoulayley)\
**Post date:** [September 22, 2017, 12:52pm UTC](https://discuss.elastic.co/t/filebeat-windows-no-event-when-log-file-contains-1-line/101133/3 "2017-09-22T12:52:49Z")

</div>

Ok , thank you, I will add a line then 🙂

---

<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:** [October 20, 2017, 12:53pm UTC](https://discuss.elastic.co/t/filebeat-windows-no-event-when-log-file-contains-1-line/101133/4 "2017-10-20T12:53:06Z")

</div>

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