<?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: regex Adding an empty line after value found in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/regex-Adding-an-empty-line-after-value-found/m-p/241626#M71853</link>
    <description>&lt;P&gt;Are you saying that in your file that you would like to merge lines such that they are treated as a multi-line event all the way until the last line which should contain "transactionid=" and then at the next newline, break the event there and start a new event?&lt;/P&gt;</description>
    <pubDate>Sat, 21 Nov 2015 19:37:01 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2015-11-21T19:37:01Z</dc:date>
    <item>
      <title>regex Adding an empty line after value found</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-Adding-an-empty-line-after-value-found/m-p/241623#M71850</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Newbie in regex, would like help to add a line after transactionid=XXXXXX. My props looks like this:&lt;/P&gt;

&lt;P&gt;[source::/nyx/nogscore/log/nogscore-*]&lt;BR /&gt;
SHOULD_LINEMERGE=False&lt;BR /&gt;
BREAK_ONLY_BEFORE_DATE=false&lt;BR /&gt;
LINE_BREAKER_LOOKBEHIND=500&lt;BR /&gt;
LINE_BREAKER=(transactionid=[0-9]+)&lt;BR /&gt;
DATETIME_CONFIG=CURRENT&lt;/P&gt;

&lt;P&gt;LOG:&lt;BR /&gt;
NNNN                :000.01| 06:37:15 [4067241XXX]    ws_proc.cpp:1002 - INFO   : 00 NOGS::wallet version match: 1.2&lt;BR /&gt;
NNNN               :000.00| 06:37:15 [40672414XXX]   ws_api12.cpp:279 * CHECK  : 10 NOGS:::#name=wager;accountid=2-4410XXX-USD,USD;activationid=;apiversion=1.0;betamount=0.06;campaignid=;clienttype=html5;currency=USD;gpgameid=doctorlove;gpid=100;jpc=;loginname=XXX;opid=XXX;password=XXX;request=wager;roundid=529233;sessionid=0000000CEDE13001c099559651a5ca63d5d325bde65907e3e55683dca0338159965a2fc1c2bfb311;transactionid=1268348 (Like a new line after this)&lt;BR /&gt;
NNNN              :000.01| 06:37:15 [4059315XXX]    ws_proc.cpp:1002 - INFO   : 00 NOGS::wallet version match: 1.2&lt;BR /&gt;
NNNN                :000.00| 06:37:15 [4059315XXX]   ws_api12.cpp:606 * CHECK  : 10 NOGS:::#name=result;accountid=2-44101XXX-USD,USD;apiversion=1.0;clienttype=html5;currency=USD;gamestatus=completed;gpgameid=doctorlove;gpid=100;houseincome=;jpwonamount=;loginname=XXX;opid=XXX;password=XXXX;request=result;roundid=529233;sessionid=0000000CEDE13001c099559651a5ca63d5d325bde65907e3e55683dca0338159965a2fc1c2bfb311;transactionid=1268349;wonamount=0.00&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:56:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-Adding-an-empty-line-after-value-found/m-p/241623#M71850</guid>
      <dc:creator>Giggs</dc:creator>
      <dc:date>2020-09-29T07:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: regex Adding an empty line after value found</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-Adding-an-empty-line-after-value-found/m-p/241624#M71851</link>
      <description>&lt;P&gt;Is your example one after you've manually inserted a carriage return into it, is it the actual LOG line as it sits on disk before Splunk ingested it, or the _raw event, or...&lt;/P&gt;

&lt;P&gt;Basically, do your events look like this (trimmed):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sessionid=0000000CEDE13001c099559651a5ca63d5d325bde65907e3e55683dca0338159965a2fc1c2bfb311;transactionid=1268348 NNNN :000.01| 06:37:15 [4059315XXX] ws_proc.cpp:1002 - INFO : 00 NOGS::wallet version match: 1.2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sessionid=0000000CEDE13001c099559651a5ca63d5d325bde65907e3e55683dca0338159965a2fc1c2bfb311;transactionid=1268348 
NNNN :000.01| 06:37:15 [4059315XXX] ws_proc.cpp:1002 - INFO : 00 NOGS::wallet version match: 1.2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And do you want them to look like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sessionid=0000000CEDE13001c099559651a5ca63d5d325bde65907e3e55683dca0338159965a2fc1c2bfb311;transactionid=1268348 
NNNN :000.01| 06:37:15 [4059315XXX] ws_proc.cpp:1002 - INFO : 00 NOGS::wallet version match: 1.2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sessionid=0000000CEDE13001c099559651a5ca63d5d325bde65907e3e55683dca0338159965a2fc1c2bfb311;transactionid=1268348 

NNNN :000.01| 06:37:15 [4059315XXX] ws_proc.cpp:1002 - INFO : 00 NOGS::wallet version match: 1.2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Nov 2015 13:54:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-Adding-an-empty-line-after-value-found/m-p/241624#M71851</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2015-11-20T13:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: regex Adding an empty line after value found</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-Adding-an-empty-line-after-value-found/m-p/241625#M71852</link>
      <description>&lt;P&gt;Looks like this :&lt;/P&gt;

&lt;P&gt;essionid=0000000CEDE13001c099559651a5ca63d5d325bde65907e3e55683dca0338159965a2fc1c2bfb311;transactionid=1268348 &lt;BR /&gt;
 NNNN :000.01| 06:37:15 [4059315XXX] ws_proc.cpp:1002 - INFO : 00 NOGS::wallet version match: 1.2&lt;/P&gt;

&lt;P&gt;Want to look like this :sessionid=0000000CEDE13001c099559651a5ca63d5d325bde65907e3e55683dca0338159965a2fc1c2bfb311;transactionid=1268348 &lt;/P&gt;

&lt;P&gt;NNNN :000.01| 06:37:15 [4059315XXX] ws_proc.cpp:1002 - INFO : 00 NOGS::wallet version match: 1.2&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2015 14:06:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-Adding-an-empty-line-after-value-found/m-p/241625#M71852</guid>
      <dc:creator>Giggs</dc:creator>
      <dc:date>2015-11-20T14:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: regex Adding an empty line after value found</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-Adding-an-empty-line-after-value-found/m-p/241626#M71853</link>
      <description>&lt;P&gt;Are you saying that in your file that you would like to merge lines such that they are treated as a multi-line event all the way until the last line which should contain "transactionid=" and then at the next newline, break the event there and start a new event?&lt;/P&gt;</description>
      <pubDate>Sat, 21 Nov 2015 19:37:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-Adding-an-empty-line-after-value-found/m-p/241626#M71853</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-11-21T19:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: regex Adding an empty line after value found</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-Adding-an-empty-line-after-value-found/m-p/241627#M71854</link>
      <description>&lt;P&gt;I am going to assume you mean exactly what you said (which seems very strange to me).  Do it like this in &lt;CODE&gt;props.conf&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::/nyx/nogscore/log/nogscore-*]
SEDCMD-add_extra_newline_at_end_of_line_after_transactionid = s/(transactionid=.*$)/\1\n/g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note: After making changes to &lt;CODE&gt;props.conf&lt;/CODE&gt; and deploying to Indexers (or Heavy Forwarders), restart all Splunk Enterprise instances to enable the configuration changes.  This applies ONLY TO EVENTS THAT ARE INDEXED POST-RESTART.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.0/Data/Anonymizedatausingconfigurationfiles"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.0/Data/Anonymizedatausingconfigurationfiles&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Nov 2015 21:04:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-Adding-an-empty-line-after-value-found/m-p/241627#M71854</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-11-21T21:04:48Z</dc:date>
    </item>
  </channel>
</rss>

