Hi,
I am trying to configure logstash to parse out a field from the event and use it as timestamp.
My input looks like that:
<Mar 1, 2016 1:54:15 PM IST> <Info> <Security> <BEA-090905> <Disabling the CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true.>
<Mar 1, 2016 1:54:15 PM IST> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG128 to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true.>
<Mar 1, 2016 1:54:15 PM IST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 25.31-b07 from Oracle Corporation.>
<Mar 1, 2016 1:54:16 PM IST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 12.1.3.0.0 Wed May 21 18:53:34 PDT 2014 1604337 >
<Mar 1, 2016 1:54:16 PM IST> <Warning> <Management> <BEA-141274> <Production mode has been specified at the command line using the the weblogic.ProductionModeEnabled system property. This system property overrides the development mode setting contained in the config.xml file. However, the Administration Console and WLST show the attribute values and defaults that correspond to the develo
My logstash filter:
filter {
if [type] == "weblogic_log" {
mutate {
add_tag => [ "WL_LOGS" ]
uppercase => [ "severity" ]
}
multiline {
patterns_dir => "/users/mpswrk1/LogStash/impls/patterns/patterns"
pattern => "^\<%{WEBLOGICTIMESTAMP} "
negate => true
what => "previous"
}
grok {
match => { "message" => "\<%{WEBLOGICTIMESTAMP} %{WORD}\> \<%{LOGLEVEL:severity}\> \<%{DATA:module}\> \<%{DATA:error_code}\> \<%{DATA:error_message}\>" }
patterns_dir => "/users/mpswrk1/LogStash/impls/patterns/patterns"
}
date {
match => [ "timestamp" , "MMM dd, yyyy HH:mm:ss" ]
#match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
}
*WEBLOGICTIMESTAMP is a private pattern I set:
WEBLOGICTIMESTAMP %{MONTH} %{MONTHDAY}, %{YEAR} %{TIME} %{DL}
DL ([P|A]M]?)
I am trying to get the Mar 1, 2016 1:54:15 PM IST which is represent by%{WEBLOGICTIMESTAMP} %{WORD} in the grok, as the timestamp. In this way I will have in the timestamp exactly the time the message occurs and not when it was load to elasticsearch.
Thanks
Sharon.