I have filebeat version 6.5.4 (amd64), libbeat 6.5.4 running on Ubuntu 16.04.5 LTS. It is configured to monitor the bro logs (I mean Zeek logs) and send those to Logstash. Up until this past weekend, it was working just fine. This past monday I came and found that logs were not being indexed into Elastic. Tracing back, I found that no logs were being sent by filebeat at all. This is obvious from doing a tcpdump at the logstash box looking for traffic from the bro/filebeat box either by IP or by port and seeing nothing but syn/ack traffic. I did not see any encrypted data being sent and there should be a steady stream of traffic. Yet Filebeat was running, the were logs being written to conn.log, and the config was correct. Following some of the troubleshooting tips (restarting, rebooting, focusing on one log file only, turning on debugging) hasn't found the problem yet. Wondering if anyone has additional suggestions.
Here is my yml:
filebeat.prospectors:
- type: log
enabled: true
paths:
- /usr/local/bro/logs/current/conn.log
tags: ["bro_conn"]
filebeat.config.modules:
path: ${path.config}/modules.d/*.yml
reload.enabled: false
reload.period: 5s
setup.template.settings:
index.number_of_shards: 3
setup.kibana:
output.logstash:
hosts: ["1.1.2.1:5044"]
According to the debug output shown in the reply below, it looks like filebeats reads each file, but nothing seems to get sent. This is what the tcpdump looks like:
11:55:36.098583 IP 1.1.2.35.5044 > 1.1.2.43.38784: Flags [P.], seq 139:145, ack 297779, win 1288, options [nop,nop,TS val 507072759 ecr 1018976], length 6
E..:.8@.@.<n
e.#
e.+.......s.........D.....
.9P....`2A....
11:55:36.098774 IP 1.1.2.43.38784 > 1.1.2.35.5044: Flags [.], ack 145, win 229, options [nop,nop,TS val 1020226 ecr 507072759], length 0
E..42D@.@..h
e.+
e.#...........y.....t.....
...B.9P.
11:55:36.688229 IP 1.1.2.43.38784 > 1.1.2.35.5044: Flags [F.], seq 297779, ack 145, win 229, options [nop,nop,TS val 1020373 ecr 507072759], length 0
E..42E@.@..g
e.+
e.#...........y...........
.....9P.
11:55:36.688439 IP 1.1.2.35.5044 > 1.1.2.43.38784: Flags [R.], seq 145, ack 297780, win 1288, options [nop,nop,TS val 507073349 ecr 1020373], length 0
E..4.9@.@.<s
e.#
e.+.......y.........k.....
.9SE....
Remember, during all this time, zeek is writing to "/usr/local/bro/logs/current/conn.log" and adding events.
filebeat is running as a service or started as root. /usr/local/bro/logs/current/conn.log is configured thus:
-rw-r--r-- 1 root root 36605035 Jan 29 16:59 /usr/local/bro/logs/current/conn.log
So why isn't filebeat reading and sending logs written by zeek?
(Not sure if this is a duplicate of FileBeat is not sending logfile to logstash or https://github.com/elastic/beats/issues/7908 but might be similar...)