<?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: Merging multiline events in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Merging-multiline-events/m-p/83462#M17339</link>
    <description>&lt;P&gt;Thanks, can you help me understand why we need&lt;BR /&gt;
BREAK_ONLY_BEFORE = \w{3}\s\d{1,2}\s\d{1,2}:\d{1,2}:\d{1,2}\sUSER?&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 09:20:47 GMT</pubDate>
    <dc:creator>sjloh17</dc:creator>
    <dc:date>2020-09-28T09:20:47Z</dc:date>
    <item>
      <title>Merging multiline events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Merging-multiline-events/m-p/83460#M17337</link>
      <description>&lt;P&gt;Greetings!&lt;/P&gt;

&lt;P&gt;I am trying to merge 2 lines into 1 event but having problems. Appreciate advice on my steps taken&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;Sample Log - Using logger command to push this to splunk via syslog. Hence the append of timestamp (and splunk treats that as separate events)&lt;/P&gt;

&lt;P&gt;Nov 1 12:12:12 event login command&lt;BR /&gt;
Nov 1 12:12:12 ----- ----- -----------&lt;BR /&gt;
Nov 1 12:12:13 USER_Create admin2 mkuser&lt;BR /&gt;
Nov 1 12:12:13 tstadmin&lt;BR /&gt;
Nov 1 12:12:13 USER_Create admin2 mkuser&lt;BR /&gt;
Nov 1 12:12:13 tstadmin&lt;BR /&gt;
Nov 1 12:12:13 USER_Remove admin2 rmuser&lt;BR /&gt;
Nov 1 12:12:13 tstadmin&lt;BR /&gt;
Nov 1 12:12:13 USER_Remove admin2 rmuser&lt;BR /&gt;
Nov 1 12:12:13 tstadmin&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Objective - I would like to group the following as 1 event to show the account created "tstadmin"&lt;/P&gt;

&lt;P&gt;Nov 1 12:12:13 USER_Create admin2 mkuser&lt;BR /&gt;
Nov 1 12:12:13 tstadmin&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Added the following stanza to \etc\system\local\props.conf &lt;/P&gt;

&lt;P&gt;[source::c:\test-multiline.txt] &lt;BR /&gt;
SHOULD_LINEMERGE = True &lt;BR /&gt;
BREAK_ONLY_BEFORE = USER_* &lt;BR /&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Restarted Splunk&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Thu, 04 Nov 2010 10:06:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Merging-multiline-events/m-p/83460#M17337</guid>
      <dc:creator>sjloh17</dc:creator>
      <dc:date>2010-11-04T10:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Merging multiline events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Merging-multiline-events/m-p/83461#M17338</link>
      <description>&lt;P&gt;Using your current props.conf, you should be able to replace the *SHOULD_LINEMERGE* line with this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;BREAK_ONLY_BEFORE = \w{3}\s\d{1,2}\s\d{1,2}:\d{1,2}:\d{1,2}\sUSER
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Replacing both of the lines with something like this would be more efficient:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;MAX_TIMESTAMP_LOOKAHEAD = 16
SHOULD_LINEMERGE = false
LINE_BREAKER = ([\r\n]+)(?=\w{3}\s\d{1,2}\s\d{1,2}:\d{1,2}:\d{1,2}\sUSER)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Nov 2010 11:52:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Merging-multiline-events/m-p/83461#M17338</guid>
      <dc:creator>bwooden</dc:creator>
      <dc:date>2010-11-04T11:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: Merging multiline events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Merging-multiline-events/m-p/83462#M17339</link>
      <description>&lt;P&gt;Thanks, can you help me understand why we need&lt;BR /&gt;
BREAK_ONLY_BEFORE = \w{3}\s\d{1,2}\s\d{1,2}:\d{1,2}:\d{1,2}\sUSER?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:20:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Merging-multiline-events/m-p/83462#M17339</guid>
      <dc:creator>sjloh17</dc:creator>
      <dc:date>2020-09-28T09:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: Merging multiline events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Merging-multiline-events/m-p/83463#M17340</link>
      <description>&lt;P&gt;I've managed to make it working by updating \etc\system\local\props.conf &lt;/P&gt;

&lt;P&gt;[multiline.txt]&lt;/P&gt;

&lt;P&gt;SHOULD_LINEMERGE = True &lt;/P&gt;

&lt;P&gt;BREAK_ONLY_BEFORE = USER_* &lt;/P&gt;

&lt;P&gt;However, taking one step forward, I'm trying to use a transform to change the name of the sourcetype. Hence, my &lt;STRONG&gt;\etc\system\local\props.conf&lt;/STRONG&gt; looks like the following&lt;/P&gt;

&lt;P&gt;[multiline.txt] &lt;/P&gt;

&lt;P&gt;TRANSFORM-changesourcetype = setsourcetype &lt;/P&gt;

&lt;P&gt;[UserAccount] &lt;/P&gt;

&lt;P&gt;SHOULD_LINEMERGE = True &lt;/P&gt;

&lt;P&gt;BREAK_ONLY_BEFORE = USER_* &lt;/P&gt;

&lt;P&gt;While my &lt;STRONG&gt;\etc\system\local\transforms.conf&lt;/STRONG&gt; looks like this&lt;/P&gt;

&lt;P&gt;[setsourcetype]&lt;/P&gt;

&lt;P&gt;DEST_KEY = MetaData:Sourcetype&lt;/P&gt;

&lt;P&gt;REGEX = USERACCOUNT&lt;/P&gt;

&lt;P&gt;FORMAT = sourcetype::UserAccount&lt;/P&gt;

&lt;P&gt;** I'm able to see the new sourcetype being created. However, the line merge is failing to work now!! I suspect its because when Splunk reads props.conf, the UserAccount sourcetype has not been created yet so it wasnt able to set the BREAK_ONLY_BEFORE field.&lt;/P&gt;

&lt;P&gt;Can someone confirm my fears?? And how can this be overcome?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2010 17:31:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Merging-multiline-events/m-p/83463#M17340</guid>
      <dc:creator>sjloh17</dc:creator>
      <dc:date>2010-11-16T17:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: Merging multiline events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Merging-multiline-events/m-p/83464#M17341</link>
      <description>&lt;P&gt;In the BREAK_ONLY_BEFORE example, that regular expression lets Splunk know that any line with a timestamp followed by USER is the beginning of a new event.  I recommend using the LINE_BREAKER option though, per original response.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:20:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Merging-multiline-events/m-p/83464#M17341</guid>
      <dc:creator>bwooden</dc:creator>
      <dc:date>2020-09-28T09:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: Merging multiline events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Merging-multiline-events/m-p/83465#M17342</link>
      <description>&lt;P&gt;I see, thanks for the info. Moving forward, I'm trying to separate the specific syslog messages from the rest (via assigning a new sourcetype). However, it appears that setting sourcetype at index time via TRANSFORMS does not select rules in props based on the new sourcetype at index time, and it only affects search time. (See post below). &lt;/P&gt;

&lt;P&gt;Is there any way this can be done?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2010 10:04:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Merging-multiline-events/m-p/83465#M17342</guid>
      <dc:creator>sjloh17</dc:creator>
      <dc:date>2010-11-18T10:04:34Z</dc:date>
    </item>
  </channel>
</rss>

