# Debugging event publishing

**URL:** <https://discuss.elastic.co/t/debugging-event-publishing/108298>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [November 19, 2017, 8:48pm UTC](https://discuss.elastic.co/t/debugging-event-publishing/108298 "2017-11-19T20:48:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nir\_Varon](https://avatars.discourse-cdn.com/v4/letter/n/a5b964/32.png) [@Nir\_Varon](https://discuss.elastic.co/u/Nir_Varon)\
**Post date:** [November 19, 2017, 8:48pm UTC](https://discuss.elastic.co/t/debugging-event-publishing/108298/1 "2017-11-19T20:48:38Z")

</div>

I would like to index 2 Json files (one event line per file) directly to Elastic.  
Here is my Filebeat configuraion:  
filebeat.modules:  
filebeat.prospectors:  
- input\_type: log  
paths:  
encoding: utf-8  
fields:  
document\_type: report  
fields\_under\_root: false  
max\_bytes: 52428800  
json.keys\_under\_root: true  
json.overwrite\_keys: true  
json.add\_error\_key: true  
output.elasticsearch:  
hosts: ["elastic:9200"]  
index: "inmaze-reports-%{+[yyyy.MM](http://yyyy.MM)}"  
bulk\_max\_size: 10  
timeout: 30  
template.enabled: true  
[template.name](http://template.name): "inmaze-reports"  
template.path: "${path.config}/reports.template.json"  
template.overwrite: true  
template.versions.2x.enabled: false  
template.versions.6x.enabled: false  
logging.level: debug  
logging.to\_files: true  
logging.files:  
rotateeverybytes: 10485760  
keepfiles: 7

my files both have the following json:  
{test1: "test1"}

Here is the debug log of my Filebeats:  
End of file reached: c:\temp\reports\test2.json; Backoff now.  
2017-11-19T22:47:00+02:00 DBG End of file reached: c:\temp\reports\test1.json; Backoff now.  
2017-11-19T22:47:02+02:00 DBG Flushing spooler because of timeout. Events flushed: 2  
2017-11-19T22:47:02+02:00 DBG No events to publish  
2017-11-19T22:47:02+02:00 DBG Events sent: 2  
2017-11-19T22:47:02+02:00 DBG Processing 2 events  
2017-11-19T22:47:02+02:00 DBG New state added for c:\temp\reports\test2.json  
2017-11-19T22:47:02+02:00 DBG New state added for c:\temp\reports\test1.json  
2017-11-19T22:47:02+02:00 DBG Registrar states cleaned up. Before: 2, After: 2

Why there are no events to publish?

---

<div class="post-metadata">

**Author:** ![Nir\_Varon](https://avatars.discourse-cdn.com/v4/letter/n/a5b964/32.png) [@Nir\_Varon](https://discuss.elastic.co/u/Nir_Varon)\
**Post date:** [November 20, 2017, 8:02pm UTC](https://discuss.elastic.co/t/debugging-event-publishing/108298/2 "2017-11-20T20:02:22Z")

</div>

There was no way around full debug... Found out that some of the files were missing new line....  
Nothing on the debug logs state that....

---

<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 18, 2017, 8:02pm UTC](https://discuss.elastic.co/t/debugging-event-publishing/108298/3 "2017-12-18T20:02:43Z")

</div>

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