I have following logstash config file for parsing following exception stack trace.
stacktrace
2015-03-02 09:01:51,040 [com.test.MyClass] ERROR - execution resulted in Exception
com.test.core.MyException
<exception line1>
<exception line2>
2015-03-02 09:01:51,040 [com.test.MyClass] ERROR - Encountered Exception, terminating execution
Config File:
input {
stdin {}
}
filter {
multiline {
pattern => "(^%{TIMESTAMP_ISO8601}) | (^.+Exception+) | (^.+Error+)"
negate => true
what => "previous"
}
}
output {
stdout { codec => rubydebug }
}
I am able to parse stack trace into single logstash field name message. However i want update the @timestamp with timestamp of first exception line i.e. 2015-03-02 09:01:51,040
Currently it has been taking default timestamp for @timestamp
Any help would appreciated.