<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can you help me with Line Breaker and Event Time? in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Can-you-help-me-with-Line-Breaker-and-Event-Time/m-p/419294#M6640</link>
    <description>&lt;P&gt;Hi Kamil,&lt;/P&gt;

&lt;P&gt;Please try below config in props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
BREAK_ONLY_BEFORE_DATE=false
CHARSET=UTF-8
LINE_BREAKER=([\r\n+])\[\w+\]\s+\w+
MAX_TIMESTAMP_LOOKAHEAD=23
NO_BINARY_CHECK=true
SHOULD_LINEMERGE=false
TIME_FORMAT=%Y-%m-%d %H:%M:%S %3N
TIME_PREFIX=(?:\[\w+\]\s+\w+(?:\s+\w+)?\:\s\(|Exception\stime\:\s)
disabled=false
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 06 Dec 2018 12:55:22 GMT</pubDate>
    <dc:creator>harsmarvania57</dc:creator>
    <dc:date>2018-12-06T12:55:22Z</dc:date>
    <item>
      <title>Can you help me with Line Breaker and Event Time?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Can-you-help-me-with-Line-Breaker-and-Event-Time/m-p/419286#M6632</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have a database crashdump file, which has the following structure (from the beginning):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;=========================================
Crash protocol for PID 289251
Rundirectory: /usr/sap/CWW/HDB02/ls5433
Process start time: 2018-11-29 15:24:13 782 Local
Exception time: 2018-11-30 21:00:50 859 Local
SectionTimeout: 30sec
KillTimeout: 300sec
=========================================

Table of contents:
   [BUILD]  Build information
   [SYSTEMINFO]  System information
   [CRASH_SHORTINFO]  Exception short info
   ...
   [DISASSEMBLY]  Disassembly of frames in callstack
   [REGISTER_OBJECTS]  Objects registers point to
   [THREADS]  Running threads
WARNING: could not suspend 1 threads

[BUILD]  Build information: (2018-11-30 21:01:01 972 Local)
Version       : 2.00.024.06.1538035880 (fa/hana2sp02)
Build host    : ld4552
Build time    : 2018-09-27 10:26:47
Platform      : linuxx86_64
Compiler      : gcc (SAP release 20170307, based on SUSE gcc6-6.2.1+r239768-2.4) 6.2.1 20160826 [gcc-6-branch revision 239773]
Maketype      : rel
Branch        : fa/hana2sp02
Git hash      : 4d5d5af986c75c6f2d61bde8b289b9c8ca078032
Git mergetime : 2018-09-27 10:11:20
Weekstone     : 0000.00.0
[OK]
--

[SYSTEMINFO]  System information: (2018-11-30 21:01:01 972 Local)
Instance CWW/02, OS Linux ls5433 4.4.121-92.98-default #1 SMP Fri Oct 19 07:52:13 UTC 2018 (e4d85ce) x86_64
[OK]
--
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now, I would like each section to be a separate event. The sections are separated with the [OK], except the heading one, but here I would not have anything against that it is combined together with the [BUILD] section together. This means I would like to set the line breaker to the [OK].&lt;/P&gt;

&lt;P&gt;Also, the event time should be set to the timestamp coming in brackets:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[BUILD]  Build information: (2018-11-30 21:01:01 972 Local)
...
[SYSTEMINFO]  System information: (2018-11-30 21:01:01 972 Local)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;etc. Unfortunately these timestamps do not come in the first line of the event, at least in case of the first event / header.&lt;/P&gt;

&lt;P&gt;How would I achieve both? &lt;/P&gt;

&lt;P&gt;The line breaker set to [OK] and the proper event time setting?&lt;/P&gt;

&lt;P&gt;Could you please advice the corresponding props.conf entries?&lt;/P&gt;

&lt;P&gt;Kind Regards,&lt;BR /&gt;
Kamil&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 10:47:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Can-you-help-me-with-Line-Breaker-and-Event-Time/m-p/419286#M6632</guid>
      <dc:creator>damucka</dc:creator>
      <dc:date>2018-12-04T10:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with Line Breaker and Event Time?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Can-you-help-me-with-Line-Breaker-and-Event-Time/m-p/419287#M6633</link>
      <description>&lt;P&gt;Hi damucka,&lt;BR /&gt;
let me understand: you want to break your file using [OK] as Line Breaker and you want as timestamp the date and time that is between round brackets, is it correct?&lt;/P&gt;

&lt;P&gt;If this is your requirements, try this props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[ my_sourcetype]
SHOULD_LINEMERGE=true
NO_BINARY_CHECK=true
BREAK_ONLY_BEFORE=\[OK\]
TIME_FORMAT=%Y-%m-%d %H:%M:%S
TIME_PREFIX=\(
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 11:43:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Can-you-help-me-with-Line-Breaker-and-Event-Time/m-p/419287#M6633</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2018-12-04T11:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with Line Breaker and Event Time?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Can-you-help-me-with-Line-Breaker-and-Event-Time/m-p/419288#M6634</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Please try below configuration&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
BREAK_ONLY_BEFORE_DATE = false
LINE_BREAKER = ([\r\n+])\[\w+\]\s{2}\w+
MAX_TIMESTAMP_LOOKAHEAD = 23
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
TIME_FORMAT = %Y-%m-%d %H:%M:%S %3N
TIME_PREFIX = information: \(
disabled = false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Above configuration will break sample event provided by you in 3 different events&lt;BR /&gt;
First Event&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;=========================================
Crash protocol for PID 289251
Rundirectory: /usr/sap/CWW/HDB02/ls5433
Process start time: 2018-11-29 15:24:13 782 Local
Exception time: 2018-11-30 21:00:50 859 Local
SectionTimeout: 30sec
KillTimeout: 300sec
=========================================

Table of contents:
   [BUILD]  Build information
   [SYSTEMINFO]  System information
   [CRASH_SHORTINFO]  Exception short info
   ...
   [DISASSEMBLY]  Disassembly of frames in callstack
   [REGISTER_OBJECTS]  Objects registers point to
   [THREADS]  Running threads
WARNING: could not suspend 1 threads
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Second Event&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[BUILD]  Build information: (2018-11-30 21:01:01 972 Local)
Version       : 2.00.024.06.1538035880 (fa/hana2sp02)
Build host    : ld4552
Build time    : 2018-09-27 10:26:47
Platform      : linuxx86_64
Compiler      : gcc (SAP release 20170307, based on SUSE gcc6-6.2.1+r239768-2.4) 6.2.1 20160826 [gcc-6-branch revision 239773]
Maketype      : rel
Branch        : fa/hana2sp02
Git hash      : 4d5d5af986c75c6f2d61bde8b289b9c8ca078032
Git mergetime : 2018-09-27 10:11:20
Weekstone     : 0000.00.0
[OK]
--
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Third Event&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[SYSTEMINFO]  System information: (2018-11-30 21:01:01 972 Local)
Instance CWW/02, OS Linux ls5433 4.4.121-92.98-default #1 SMP Fri Oct 19 07:52:13 UTC 2018 (e4d85ce) x86_64
[OK]
--
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Dec 2018 11:56:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Can-you-help-me-with-Line-Breaker-and-Event-Time/m-p/419288#M6634</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-12-04T11:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with Line Breaker and Event Time?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Can-you-help-me-with-Line-Breaker-and-Event-Time/m-p/419289#M6635</link>
      <description>&lt;P&gt;Hello harsmarvania57,&lt;/P&gt;

&lt;P&gt;Thank you.&lt;BR /&gt;
Could you perhaps say how the first event will get the event time set in this case?&lt;BR /&gt;
The string "information: (" is not there.&lt;BR /&gt;
Also, the rest of the log entries look like the 3-rd one, separated with the [OK]. Will they be translated properly split and given the timestamp like in the case of the 3-rd one?&lt;/P&gt;

&lt;P&gt;Kind Regards,&lt;BR /&gt;
Kamil&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 13:05:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Can-you-help-me-with-Line-Breaker-and-Event-Time/m-p/419289#M6635</guid>
      <dc:creator>damucka</dc:creator>
      <dc:date>2018-12-04T13:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with Line Breaker and Event Time?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Can-you-help-me-with-Line-Breaker-and-Event-Time/m-p/419290#M6636</link>
      <description>&lt;P&gt;Hi Kamil,&lt;/P&gt;

&lt;P&gt;For the First event, splunk will not able to find timestamp because I have explicitly given &lt;CODE&gt;TIME_PREFIX = information: \(&lt;/CODE&gt; so in this case splunk will assign system time when event actually parsed by splunk.&lt;/P&gt;

&lt;P&gt;If you want to set timestamp for the First Event then you can change &lt;CODE&gt;TIME_PREFIX&lt;/CODE&gt; as given below.&lt;/P&gt;

&lt;P&gt;If you want &lt;CODE&gt;Process start time:&lt;/CODE&gt; then &lt;CODE&gt;TIME_PREFIX = (information: \(|Process start time: )&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;If you want &lt;CODE&gt;Exception time:&lt;/CODE&gt; then &lt;CODE&gt;TIME_PREFIX = (information: \(|Exception time: )&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I didn't get what you are trying to say for 3rd one but splunk will assign timestamp as &lt;CODE&gt;2018-11-30 21:01:01 972&lt;/CODE&gt; to 3rd event. Is this what you are looking for?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 13:16:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Can-you-help-me-with-Line-Breaker-and-Event-Time/m-p/419290#M6636</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-12-04T13:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with Line Breaker and Event Time?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Can-you-help-me-with-Line-Breaker-and-Event-Time/m-p/419291#M6637</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;Thank you, I think the &lt;BR /&gt;
    TIME_PREFIX = (information: (|Exception time: )&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;is the option to choose. With the 3rd event I meant, that the file is big and has many sections/logs/events which look precisely like the 3rd log. I wanted to just reassure that the configuration above will correctly get them, but I guess this became obvious to me now.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thank you, I will check the configuration proposed by you.&lt;/P&gt;

&lt;P&gt;Kind Regards,&lt;BR /&gt;
Kamil&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 14:11:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Can-you-help-me-with-Line-Breaker-and-Event-Time/m-p/419291#M6637</guid>
      <dc:creator>damucka</dc:creator>
      <dc:date>2018-12-04T14:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with Line Breaker and Event Time?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Can-you-help-me-with-Line-Breaker-and-Event-Time/m-p/419292#M6638</link>
      <description>&lt;P&gt;Best to test this configuration in Standalone or Test environment and then implement it in production. I have converted my comment to answer and if it will work then you can accept it.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 14:14:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Can-you-help-me-with-Line-Breaker-and-Event-Time/m-p/419292#M6638</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-12-04T14:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with Line Breaker and Event Time?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Can-you-help-me-with-Line-Breaker-and-Event-Time/m-p/419293#M6639</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;One more question.&lt;BR /&gt;
Unfortunately I noticed first now that the date prefix is not always "information: (", so sometimes the event time is set wrong. For example:&lt;BR /&gt;
    [CRASH_EMERGENCYSTACK]  Emergency stacktrace: (2018-11-30 21:01:01 973 Local)&lt;/P&gt;

&lt;P&gt;Also when I would like to define the prefix as only ": (" it will not work as there are other strings with this suffix. In principle I would need to define the prefix using the regex somehow, telling that this would be the line with the [] brackets and having the ": (" as a prefix.&lt;BR /&gt;
Is it possible?&lt;/P&gt;

&lt;P&gt;Kind regards,&lt;BR /&gt;
Kamil&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 12:39:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Can-you-help-me-with-Line-Breaker-and-Event-Time/m-p/419293#M6639</guid>
      <dc:creator>damucka</dc:creator>
      <dc:date>2018-12-06T12:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with Line Breaker and Event Time?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Can-you-help-me-with-Line-Breaker-and-Event-Time/m-p/419294#M6640</link>
      <description>&lt;P&gt;Hi Kamil,&lt;/P&gt;

&lt;P&gt;Please try below config in props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
BREAK_ONLY_BEFORE_DATE=false
CHARSET=UTF-8
LINE_BREAKER=([\r\n+])\[\w+\]\s+\w+
MAX_TIMESTAMP_LOOKAHEAD=23
NO_BINARY_CHECK=true
SHOULD_LINEMERGE=false
TIME_FORMAT=%Y-%m-%d %H:%M:%S %3N
TIME_PREFIX=(?:\[\w+\]\s+\w+(?:\s+\w+)?\:\s\(|Exception\stime\:\s)
disabled=false
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 Dec 2018 12:55:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Can-you-help-me-with-Line-Breaker-and-Event-Time/m-p/419294#M6640</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-12-06T12:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with Line Breaker and Event Time?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Can-you-help-me-with-Line-Breaker-and-Event-Time/m-p/419295#M6641</link>
      <description>&lt;P&gt;Hello harsmanvania57,&lt;/P&gt;

&lt;P&gt;Thank you.&lt;BR /&gt;
The above configuration works for all sections of the crashdump file but one and I do not why.&lt;BR /&gt;
For the section below the timestamps seems not to be recognized correctly and the event time is set wrongly:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[CRASH_EXTINFO]  Extended exception info: (2018-12-03 12:29:34 058 Local)
----&amp;gt; Dump of siginfo contents &amp;lt;----
  signal:      11(SIGSEGV)
  code:        STACK OVERFLOW: 2(SEGV_ACCERR: invalid permissions for mapped object)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The event time set is 12:29:34.015 PM, so it is taken from the previous section.&lt;BR /&gt;
The next section after that gets recognized already correctly (timestamp) and the event time is set in a right way:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[CRASH_CONTEXT]  Context info: (2018-12-03 12:29:34 058 Local)
----&amp;gt; Crashing context information &amp;lt;----
  ContextStack at (0x00007f3b4e31c460)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The event time set in this case is 12:29:34.058 PM, so it is correct.&lt;/P&gt;

&lt;P&gt;Any hint why in this one case the timestamp does not get recognized correctly?&lt;/P&gt;

&lt;P&gt;Kind Regards,&lt;BR /&gt;
Kamil&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 10:11:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Can-you-help-me-with-Line-Breaker-and-Event-Time/m-p/419295#M6641</guid>
      <dc:creator>damucka</dc:creator>
      <dc:date>2018-12-10T10:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with Line Breaker and Event Time?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Can-you-help-me-with-Line-Breaker-and-Event-Time/m-p/419296#M6642</link>
      <description>&lt;P&gt;As you don't have fixed number of words after &lt;CODE&gt;[]&lt;/CODE&gt; and before &lt;CODE&gt;: (&lt;/CODE&gt;, &lt;CODE&gt;TIME_PREFIX&lt;/CODE&gt; regex didn't work for below content.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[CRASH_EXTINFO]  Extended exception info: (2018-12-03 12:29:34 058 Local)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Try &lt;CODE&gt;TIME_PREFIX = (?:\[\w+\]\s+\w+(?:\s+\w+)*?\:\s\(|Exception\stime\:\s)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 10:23:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Can-you-help-me-with-Line-Breaker-and-Event-Time/m-p/419296#M6642</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-12-10T10:23:54Z</dc:date>
    </item>
  </channel>
</rss>

