I'm trying to stream IIS advanced logs via Filebeat to Logstash -> Elasticsearch. If I delete the registry files and restart filebeat it loads all of the data, but does not load any additional log lines after the initial read. I'm not using the actual IIS module since I'm sending to Logstash first for parsing purposes. My filebeat input is this:
Can someone tell me what I'm doing wrong? I'm running Filebeat 6.4.2 and Logstash/Elasticsearch 6.4.1. However this problem presented in previous versions as well.
I do not see any errors in the log output. When restarting filebeat, it gets the latest events since the last restart, but nothing new while it's running. It appears it gets to the end of the file and then just stops sending more data. The process continues to run, it just does not send any new logs since it was started.
That's correct. It updates the registry file with the latest changes when it's started and sends the latest information. However if new events are appended after the initial read, those appended events are not recognized until Filebeat is restarted. There are no connection or timeout messages in the debug/info log.
None that I'm seeing. The Info level logs on the filebeat side shows the following:
2018-10-25T11:07:31.481-0400 INFO [monitoring] log/log.go:141 Non-zero metrics in the last 30s {"monito
ring": {"metrics": {"beat":{"cpu":{"system":{"ticks":327},"total":{"ticks":779,"value":779},"user":{"ticks":452}},"info"
:{"ephemeral_id":"4ea49c67-8a37-417c-9cef-ac681b6c3daf","uptime":{"ms":4980211}},"memstats":{"gc_next":4194304,"memory_a
lloc":1743312,"memory_total":11593120,"rss":16384}},"filebeat":{"harvester":{"open_files":0,"running":0}},"libbeat":{"co
nfig":{"module":{"running":0}},"pipeline":{"clients":1,"events":{"active":1}}},"registrar":{"states":{"current":26}}}}}
2018-10-25T11:08:01.486-0400 INFO [monitoring] log/log.go:141 Non-zero metrics in the last 30s {"monito
ring": {"metrics": {"beat":{"cpu":{"system":{"ticks":327},"total":{"ticks":779,"value":779},"user":{"ticks":452}},"info"
:{"ephemeral_id":"4ea49c67-8a37-417c-9cef-ac681b6c3daf","uptime":{"ms":5010211}},"memstats":{"gc_next":4194304,"memory_a
lloc":1792128,"memory_total":11641936}},"filebeat":{"harvester":{"open_files":0,"running":0}},"libbeat":{"config":{"modu
le":{"running":0}},"pipeline":{"clients":1,"events":{"active":1}}},"registrar":{"states":{"current":26}}}}}
It's almost like it reaches the end of the file and then never captures the appended events or re-harvests the file to look for changes.
If you start filebeat with -e -d "harvester" it will give you a lot more log debug. I am interested to know if FB is closing the log file in question and why it does that.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.