Hi,
I am trying to use the following grok filter to extract fields from log file, The log file contains 2 different style of logs, hence I wrote 2 different queries to tackle the 2 logs. However, it's failing on one of the logs..the one inside the if statement..i get "grokparsefailure error" Please help me.
filter {
grok {
match => [ "message", "%{NOTSPACE}%{TIME}%{SPACE}%{NOTSPACE}%{SPACE}%{NOTSPACE}%{NOTSPACE}%{NOTSPACE}%{NOTSPACE}%{SPACE}%{NOTSPACE}%{SPACE}%{NOTSPACE}%{NOTSPACE}%{NOTSPACE}%{NOTSPACE}%{NOTSPACE} %{WORD}%{NOTSPACE}%{SPACE}%{NOTSPACE}%{WORD}%{NOTSPACE}%{SPACE}%{NOTSPACE}%{SPACE}%{NOTSPACE}%{NOTSPACE}%{SPACE}%{NOTSPACE}%{SPACE}%{NOTSPACE}%{NOTSPACE}%{SPACE}%{NOTSPACE} %{NOTSPACE:requestType} %{NOTSPACE} %{NOTSPACE:requestStatus} %{NOTSPACE} %{NOTSPACE:requestDetails}" ]
}
if[requestType] == "PROCESSING" {
grok {
match => [ "message", "%{NOTSPACE}%{TIME}%{SPACE}%{NOTSPACE}%{SPACE}%{NOTSPACE}%{NOTSPACE}%{NOTSPACE}%{NOTSPACE}%{SPACE}%{NOTSPACE}%{SPACE}%{NOTSPACE}%{NOTSPACE}%{NOTSPACE}%{NOTSPACE}%{NOTSPACE}%{WORD}%{NOTSPACE} %{NOTSPACE} %{NOTSPACE:requestType} %{NOTSPACE} %{NOTSPACE:requestStatus} %{NOTSPACE}%{SPACE}%{GREEDYDATA:requestDetails}" ]
}
}
mutate {
remove => [ "message" ]
}
}
The log file contents below
2016-05-20 07:13:13 | INFO | [jmsContainer-10] | AQ-REQ | PROCESSING | FAILED FOR urn:gsma:imei:35774606-004713-0 I/O error on POST request for "https://spp.msg.t-mobile.com:8083/pushnotification/v1.0/message":Read timed out; nested exception is java.net.SocketTimeoutException: Read timed out
2016-05-20 13:13:50 | INFO | [[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'] | WAKEUP-REQ | RECEIVED | urn:gsma:imei:35774606-004713-0