<?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: Updated : JSON event break for multiple source type and single event in multiple lines. in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Updated-JSON-event-break-for-multiple-source-type-and-single/m-p/413596#M73178</link>
    <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;P&gt;props.conf (on indexer/heavy forwarder whichever comes first)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[reset_profiler]
SHOULD_LINEMERGE = false
LINE_BREAKER = (\r\n]+)(?=\[\s*\{)
DATETIME_CONFIG = CURRENT
TRANSFORMS-sourcetye_routing = reset_profiler_st_override
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf (on indexer/heavy forwarder whichever comes first)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[reset_profiler_st_override]
DEST_KEY = MetaData:Sourcetype
 REGEX =\"type\"\s*\:\s*\"([^\"]+)\"
 FORMAT = sourcetype::reset_profiler:$1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf (on search head)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[reset_profiler:formula]
 KV_MODE= json

 [reset_profiler:risks]
 KV_MODE= json
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 21 May 2018 18:25:30 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2018-05-21T18:25:30Z</dc:date>
    <item>
      <title>Updated : JSON event break for multiple source type and single event in multiple lines.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Updated-JSON-event-break-for-multiple-source-type-and-single/m-p/413595#M73177</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am uploading json file having 2 different source type and single event is split multiple lines.&lt;/P&gt;

&lt;P&gt;I am very close to solution but having issue with a small problem. &lt;/P&gt;

&lt;P&gt;Problem: I am not be able to use these together in props.conf. only 1 is working at a time.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;1.
SEDCMD-remove_bracket = s/\[|\]//g
SEDCMD-remove_coma = s/\},/}\n/g
2.
MUST_BREAK_AFTER = \}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;JSON logs after removing extra charaters(" [ , ] , }, ") to convert it in correct Json format    &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  {
      "name" : "CounterpartyNotional",
      "type" : "RiskBreakdown",
      "duration" : 20848,
      "count" : 1,
      "average" : 20848.0
    }
 {
      "name" : "CounterpartyPreSettlement",
      "type" : "RiskBreakdown",
      "duration" : 15370,
      "count" : 1,
      "average" : 15370.0
    }
     {
      "name" : "TraderCurrency",
      "type" : "Formula",
      "duration" : 344,
      "count" : 1,
      "average" : 344.0
    } 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5011i91EE3AE2D9182EAB/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;transform.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[reset_profiler_formula]
DEST_KEY = MetaData:Sourcetype
REGEX = \"type\" : \"RiskBreakdown\"
FORMAT = sourcetype::reset_profiler:risks

[reset_profiler_risks]
DEST_KEY = MetaData:Sourcetype
REGEX = \"type\" : \"Formula\"
FORMAT = sourcetype::reset_profiler:formula
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;prop.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[reset_profiler]
SEDCMD-remove_bracket = s/\[|\]//g
SEDCMD-remove_coma = s/\},/}\n/g
KV_MODE = json
NO_BINARY_CHECK = true
MUST_BREAK_AFTER = \}
TRANSFORMS-sourcetye_routing = reset_profiler_formula,reset_profiler_risks

[reset_profiler:formula]
KV_MODE= json

[reset_profiler:risks]
KV_MODE= json
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 21 May 2018 17:43:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Updated-JSON-event-break-for-multiple-source-type-and-single/m-p/413595#M73177</guid>
      <dc:creator>AKG1_old1</dc:creator>
      <dc:date>2018-05-21T17:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Updated : JSON event break for multiple source type and single event in multiple lines.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Updated-JSON-event-break-for-multiple-source-type-and-single/m-p/413596#M73178</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;P&gt;props.conf (on indexer/heavy forwarder whichever comes first)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[reset_profiler]
SHOULD_LINEMERGE = false
LINE_BREAKER = (\r\n]+)(?=\[\s*\{)
DATETIME_CONFIG = CURRENT
TRANSFORMS-sourcetye_routing = reset_profiler_st_override
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf (on indexer/heavy forwarder whichever comes first)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[reset_profiler_st_override]
DEST_KEY = MetaData:Sourcetype
 REGEX =\"type\"\s*\:\s*\"([^\"]+)\"
 FORMAT = sourcetype::reset_profiler:$1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf (on search head)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[reset_profiler:formula]
 KV_MODE= json

 [reset_profiler:risks]
 KV_MODE= json
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 May 2018 18:25:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Updated-JSON-event-break-for-multiple-source-type-and-single/m-p/413596#M73178</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-05-21T18:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: Updated : JSON event break for multiple source type and single event in multiple lines.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Updated-JSON-event-break-for-multiple-source-type-and-single/m-p/413597#M73179</link>
      <description>&lt;P&gt;@somesoni : Thanks for reply but now all events in one file taken as single event.&lt;/P&gt;</description>
      <pubDate>Mon, 21 May 2018 21:46:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Updated-JSON-event-break-for-multiple-source-type-and-single/m-p/413597#M73179</guid>
      <dc:creator>AKG1_old1</dc:creator>
      <dc:date>2018-05-21T21:46:56Z</dc:date>
    </item>
  </channel>
</rss>

