Hi, I am using filebeat 5.6.X version
With the below config, filebeat sends five lines to elasticsearch from below log file, using multi line pattern. But the first line " host down true wiley-host" is dropped. How to get the line "host down true wiley-host" into elasticsearch as a separate document. any suggestions??
Below is the actual log file i am parsing
host down true wiley-host
Alert high CPU status on host wiley-host
cannot reach the host. Port not reachable
host down form twenty minutes
host status unknown for last twenty minutes
service execution failed with exit status 22
Below is my filebeat config
filebeat:
prospectors:
- input_type: log
paths:
- "/var/lib/host/wiley.log"
fields:
type: hostlog
fields_under_root: true
multiline.pattern: '(exit status 22$)'
multiline.negate: true
multiline.match: before
multiline.max_lines: 5
output:
kafka:
hosts:
- host1.skg.com:29092
- host2.skg.com:39092
- host3.skg.com:49092
topic: logs-%{[type]}
output in kibana
message: Alert high CPU status on host wiley-host
cannot reach the host. Port not reachable
host down form twenty minutes
host status unknown for last twenty minutes
service execution failed with exit status 22
Note: I am not using the filter pattern on logstash for the reason(below) mentioned in logstash docs
If you are sending multiline events to Logstash, use the options described here to handle multiline events before sending the event data to Logstash. Trying to implement multiline event handling in Logstash (for example, by using the Logstash multiline codec) may result in the mixing of streams and corrupted data.