I am trying to create filter for my Log file. My log is:
=-=-=-=-=-=-=-=-
Timestamp: Thursday, April 19, 2018 2:48:49 AM
Message: HandlingID: 3
An exception of type 'System.Exception' occurred and was caught.
----------------------------------------------------------------
04/19/2018 02:48:49
Type : System.Exception,ib, Version=4.0.0.0, Culture=neutral
Message : TRY
Source :
Help link :
Data : LinkedList
TargetSite :
HResult : LALA
Stack Trace : The stack trace is unavailable.
Additional Info:
MachineName : S
TimeStamp : 4/19/2018 6:48:49 AM
FullName : Some Info
AppDomainName : AA
ThreadIdentity :
WindowsIdentity : jj
Category: Error
Priority: 0
EventId: 1
Severity: Extreme
Title:p
Machine: S
Application Domain: y
Process Id:
Process Name: l
Win32 Thread Id: 6
Thread Name:
Extended Properties:
=-=-=-=-=-=-=-=-
=-=-=-=-=-=-=-=-
//SIMILAR LOG
=-=-=-=-=-=-=-=-
Here =-=-=-=-=-=-=-=- denotes the end and starting of a new log. My config file is:
input {
beats {
port => "5044"
}
}
filter {
multiline {
pattern => "^=-=-=-=-=-=-=-=-"
negate => true
what => previous
}
}
output {
elasticsearch {
hosts => [ "localhost:9200" ]
}
}
This is creating 2 documents(rows) for each log. One containing separator+log and other contains separator only. I want to delete the document containing only separator. Also , Please let me know how to split my log into different fields and if there is any proper documentation which could help me forming filters . I am new to logstash.