Hi,
I am getting started with logstash and I am looking for some help.
I loaded the log file to ES but the logtimestamp field is a string. I want it to be a date. I understood how to convert to numeric data, but have not found anything for string-to-date conversion.
Sample data from the log file (parts were cut off to shorten the message):
Jul 1, 2015 5:15:04 PM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already. Could not load ....
Jul 2, 2015 6:15:04 PM org.apache.catalina.loader.WebappClassLoader findResourceInternal
INFO: something bad: this web application instance has been stopped already. Could not load ...
I used mutliline first to merge the lines and then grok to parse the message field using patterns:
snippet from my config file:
grok {
patterns_dir => "my_grok_patterns"
match => { "message" => "%{CATALINA_DATESTAMP:logtimestamp} %{JAVACLASS:java_domain} %{WORD:java_class}%{GREEDYDATA:error_msg}" }
}
Thanks in advance for any pointers.
Frank.