Hi There,
I would like to write a logstash config file with an if else condition.
line 1:
"Severity","ThreadID","Date","Time","Application","Message"
GROK for Line 1:
%{DATA:Severity}","%{DATA:ThreadID}","%{DATA:Date}","%{DATA:Time}","%{DATA:Application}","%{GREEDYDATA:Message}
line 2:
"Information","jrpp-0","01/24/13","00:29:50",,"[Workflows] Demo: Begin"
GROK for Line 2:
%{WORD:Severity}","%{DATA:ThreadID}","%{DATA:date}","%{DATA:time}",,"%{GREEDYDATA:message}
I want to ignore the line one logs.
could you please help me to write this logstash.conf file.
filter
{
grok {
match => ["message", "%{WORD:Severity}","%{DATA:ThreadID}","%{DATA:date}","%{DATA:time}",,"%{GREEDYDATA:message}"]
}
mutate { add_field => { "datetime" => "%{date} %{time}" } }
date {
match => [ "datetime", "YY-MM-dd HH:mm:ss" ]
timezone => "Etc/UCT"
}
}
thanks in advance.