I. 2016/03/08 09:22:34. Hi My name is Nil.
This is a test message
I. 2016/03/08 09:22:35. This is the message 2
I. 2016/03/08 09:22:36. This is multiline message 3
message 3
I. 2016/03/08 09:22:37. Thanks for all your help.
I am not sure if that is exactly what you need, but it will append any line that does not begin with "I." to the previous line, then create the timestamp from the date in the log entry.
Hi Mick,
Thanks for quick response. I have tried seems not working as desired.
Given below is the conf file I am using also have given data sample. Always the line will start with either I. or E. or W.
Thanks
Nil
I. 2016/03/05 06:48:08. NIL TEST'
Copyright 2014
SAP AG or an SAP affiliate company. All rights reserved.
Unpublished rights reserved under U.S. copyright laws.
This software contains confidential and trade secret information of SAP AG or
an SAP affiliate company. Use, duplication or disclosure of the software and
documentation by the U.S. Government is subject to restrictions set forth
I. 2016/03/05 06:48:08. Using interfaces file '/irs_rs/database/NIL_RS/etc/interfaces'.
I. 2016/03/05 06:48:08. Server name is 'NIL_RS'.
I. 2016/03/05 06:48:08. Replication Server memory model: 64bit.
I. 2016/03/06 03:42:33. A grouped transaction of 2 individual transactions has failed in database 'IQSRV.GPST02'. It will be broken into smaller groups and retried.
E. 2016/03/06 03:42:33. ERROR #1027 DSI EXEC(259(1) IQSRV.GPST01) - /generic/useful/cm.c(6157)
Open Client Client-Library error: Error: 84083972, Severity 5 -- 'ct_connect(): network packet layer: internal net library error: Net-Lib protocol driver call to connect two endpoints failed', Operating System error 146 -- 'Socket connect failed - errno 146 Connection refused'.
E. 2016/03/06 03:42:33. ERROR #13045 DSI EXEC(259(1) IQSRV.GPST01) - /generic/useful/cm.c(6162)
Failed to connect to server 'IQSRV' as user 'GPST01'. See CT-Lib and/or server error messages for more information.
I. 2016/03/06 03:42:33. Trying to connect to server 'IQSRV' as user 'GPST01' ......
E. 2016/03/06 03:42:33. ERROR #1027 DSI EXEC(260(1) IQSRV.GPST02) - /generic/useful/cm.c(6157)
Open Client Client-Library error: Error: 84083972, Severity 5 -- 'ct_connect(): network packet layer: internal net library error: Net-Lib protocol driver call to connect two endpoints failed', Operating System error 146 -- 'Socket connect failed - errno 146 Connection refused'.
E. 2016/03/06 03:42:33. ERROR #13045 DSI EXEC(260(1) IQSRV.GPST02) - /generic/useful/cm.c(6162)
Failed to connect to server 'IQSRV' as user 'GPST02'. See CT-Lib and/or server error messages for more information.
I. 2016/03/06 03:42:33. Trying to connect to server 'IQSRV' as user 'GPST02' ......
I. 2016/03/06 03:44:41. Still trying to connect to server 'IQSRV' as user 'GPST02' ......
I. 2016/03/06 17:31:05. ...... connected to server 'RPTSRV02' as user 'GPS_maint'.
W. 2016/03/06 20:05:55. WARNING #5091 DSI EXEC(328(1) IQSRV.CLIENT_REF) - neric/dsi/dsiqmint.c(4944)
A transaction for database 'IQSRV.CLIENT_REF' failed. It will be retried 5 times. The data server error received (#-157) is mapped to RETRY_LOG or RETRY_STOP.
I. 2016/03/06 20:30:04. Connection to server 'IQSRV' as user 'CLIENT_REF' has been faded out (closed).
I. 2016/03/07 00:53:41. ...... connected to server 'IQSRV' as user 'CLIENT_REF'.
E. 2016/03/07 03:15:31. ERROR #1027 DSI EXEC(295(2) DW_PRD.DW_GPS00) - eneric/dsi/dsiutil.c(439)
Open Client Client-Library error: Error: 84083975, Severity 5 -- 'ct_send(): network packet layer: internal net library error: Net-Library operation terminated due to disconnect'.
E. 2016/03/07 03:15:31. ERROR #5215 DSI EXEC(295(2) DW_PRD.DW_GPS00) - eneric/dsi/dsiutil.c(451)
The interface function 'RCIExecute' returns FAIL for database 'DW_PRD.DW_GPS00'. The errors are retryable. The DSI thread will restart automatically. See messages from the interface function for more information.
I. 2016/03/07 03:24:43. Connection to server 'IQSRV' as user 'CLIENT_REF' has been faded out (closed).
I. 2016/03/07 03:31:09. ...... connected to server 'IQSRV' as user 'CLIENT_REF'.
match => [ "message", "I. %{SPACE}(?<mytimestamp>%{YEAR}/%{MONTHNUM}/%{MONTHDAY} %{HOUR}:%{MINUTE}:${SECOND})" ]
Be systematic. Start with the simplest possible expression, e.g.
^I\.
and build from there until it stops working.
In this case I believe you'll notice that things stop working after you add %{SPACE} because in the example log message there's only one space after "I." but the expression above requires two.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.