lo@lo-VirtualBox:/etc/filebeat$ sudo service filebeat restart
* Restarting Sends log files to Logstash or directly to Elasticsearch. filebeat 2016/11/17 09:58:57.666470 beat.go:264: INFO Home path: [/usr/share/filebeat] Config path: [/etc/filebeat] Data path: [/var/lib/filebeat] Logs path: [/var/log/filebeat]
2016/11/17 09:58:57.669682 beat.go:174: INFO Setup Beat: filebeat; Version: 5.0.1
2016/11/17 09:58:57.669810 processor.go:43: DBG Processors:
2016/11/17 09:58:57.669901 beat.go:180: DBG Initializing output plugins
2016/11/17 09:58:57.670366 logstash.go:90: INFO Max Retries set to: 3
2016/11/17 09:58:57.671280 outputs.go:106: INFO Activated logstash as output plugin.
2016/11/17 09:58:57.671368 publish.go:234: DBG Create output worker
2016/11/17 09:58:57.671483 publish.go:276: DBG No output is defined to store the topology. The server fields might not be filled.
2016/11/17 09:58:57.671728 publish.go:291: INFO Publisher name: lo-VirtualBox
2016/11/17 09:58:57.671994 async.go:63: INFO Flush Interval set to: 1s
2016/11/17 09:58:57.672725 async.go:64: INFO Max Bulk Size set to: 2048
2016/11/17 09:58:57.672807 async.go:72: DBG create bulk processing worker (interval=1s, bulk size=2048)
Config OK
Checking the log
2016-11-17T11:05:26+01:00 INFO Starting Registrar
2016-11-17T11:05:26+01:00 INFO Start sending events to output
2016-11-17T11:05:26+01:00 INFO Starting spooler: spool_size: 2048; idle_timeout: 5s
2016-11-17T11:05:31+01:00 DBG Flushing spooler because of timeout. Events flushed: 1
2016-11-17T11:05:31+01:00 DBG No events to publish
2016-11-17T11:05:31+01:00 DBG Events sent: 1
2016-11-17T11:05:31+01:00 DBG Processing 1 events
2016-11-17T11:05:31+01:00 DBG Registrar states cleaned up. Before: 1 , After: 1
2016-11-17T11:05:31+01:00 DBG Write registry file: /var/lib/filebeat/registry
2016-11-17T11:05:31+01:00 DBG Registry file updated. 1 states written.
2016-11-17T11:05:36+01:00 DBG Run prospector
2016-11-17T11:05:36+01:00 DBG Start next scan
2016-11-17T11:05:36+01:00 DBG Check file for harvesting: /var/log/syslog.log
2016-11-17T11:05:36+01:00 DBG Update existing file for harvesting: /var/log/syslog.log, offset: 0
2016-11-17T11:05:36+01:00 DBG File didn't change: /var/log/syslog.log
2016-11-17T11:05:36+01:00 DBG Prospector states cleaned up. Before: 1, After: 1
2016-11-17T11:05:36+01:00 DBG Flushing spooler because of timeout. Events flushed: 0
2016-11-17T11:05:41+01:00 DBG Flushing spooler because of timeout. Events flushed: 0
2016-11-17T11:05:46+01:00 DBG Run prospector
2016-11-17T11:05:46+01:00 DBG Start next scan
2016-11-17T11:05:46+01:00 DBG Check file for harvesting: /var/log/syslog.log
2016-11-17T11:05:46+01:00 DBG Update existing file for harvesting: /var/log/syslog.log, offset: 0
2016-11-17T11:05:46+01:00 DBG File didn't change: /var/log/syslog.log
2016-11-17T11:05:46+01:00 DBG Prospector states cleaned up. Before: 1, After: 1
2016-11-17T11:05:46+01:00 DBG Flushing spooler because of timeout. Events flushed: 0
2016-11-17T11:05:51+01:00 DBG Flushing spooler because of timeout. Events flushed: 0
2016-11-17T11:05:56+01:00 INFO Non-zero metrics in the last 30s: publish.events=1 registrar.writes=1 registar.states.current=1 registrar.states.update=1
2016-11-17T11:05:56+01:00 DBG Run prospector
2016-11-17T11:05:56+01:00 DBG Start next scan
2016-11-17T11:05:56+01:00 DBG Check file for harvesting: /var/log/syslog.log
2016-11-17T11:05:56+01:00 DBG Update existing file for harvesting: /var/log/syslog.log, offset: 0
2016-11-17T11:05:56+01:00 DBG File didn't change: /var/log/syslog.log
2016-11-17T11:05:56+01:00 DBG Prospector states cleaned up. Before: 1, After: 1
2016-11-17T11:05:56+01:00 DBG Flushing spooler because of timeout. Events flushed: 0
THe point is that for now I have stopped logging into syslog, however, if I send something to syslog with the commnad $logger "HELLO" that line should be procesed by filebeat, but it is not, in debug mode I don't see that it read syslog.log even if I send something manually.
The virtual box is a mounted volume, so filebeat runs into a non-virtual machine. Why should that affect?
The above line is only processed if it has a newline character at the end.
Playing around with virtualbox in the past and shared volumes I saw some strange behaviours happen as sometimes size or modtime were not updated or inodes changed. That was more then a year ago and on OS X. So filebeat is running on your host machine and logs are produced inside the virtual box?
If you run ls -li you see mod time and inode which you can compare with what is in the registry file. Make sure to run it on the same machine that filebeat is running, not the log producing side.
Can you try to run filebeat on the same machine as the where the logs are produced to see if that is going to work? For testing you can use the file or console output. Did you run the above command multiple times in the same minute or the the time just not change?
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.