Hi
i m having issue while parsing Java Exception stack trace, here we customize our logs
which include some custom parameter just after time stamp
Ex
10:10:03,463#l-21778964801742026### ERROR [PushNotificationServiceImpl] - Error: {}
com.amazonaws.services.sns.model.InvalidParameterException: Invalid parameter: TargetArn Reason: No endpoint found for the target arn specified (Service: AmazonSNS; Status Code: 400; Error Code: InvalidParameter; Request ID: cf2d806b-3621-5d90-a17b-d3251d42c16d)
at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:889)
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:485)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:257)
other type of exception is
10:09:04,508#### ERROR [PushNotificationServiceImpl] - Error: {}
com.amazonaws.services.sns.model.EndpointDisabledException: Endpoint is disabled (Service: AmazonSNS; Status Code: 400; Error Code: EndpointDisabled; Request ID: 752b82b4-1da9-5fab-af50-d1fa3681a6bc)
at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:889)
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:485)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:257)
at com.amazonaws.services.sns.AmazonSNSClient.invoke(AmazonSNSClient.java:2237)
at com.amazonaws.services.sns.AmazonSNSClient.publish(AmazonSNSClient.java:1358)
so as you can see just after TIME there is custom code with in '#l-NUMBER###'
i m unable to parse it not even close of my requirement
and i have to put each thing in septate tag like
"time": 10:09:04,508
"customtransectionid": l-NUMBER
"loglevel":"ERROR"
"classname": "PushNotificationServiceImpl"
"errormessage":"Error: {}"
"exception":"com.amazonaws.services.sns.model.EndpointDisabledException"
"stacktrace":""
to achieve this is use
multiline codec in my input block
codec => multiline {
pattern => "^%{TIME}*"
negate => "true"
what => "previous"
}
in my filter block i use
filter {
grok {
match => {"message"=>"\A%{TIME:timestamp}#%{DATA:alpha}-%{NUMBER:number}###%{SPACE}%{LOGLEVEL:loglevel}%{GREEDYDATA:gdata}"}
}
}
and drop some _grokparsefailure events and change date/timestamp tag to
so please help me so for creating this grok match filer or some other way to do this thing