<?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: need help in formatting the data in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/need-help-in-formatting-the-data/m-p/357045#M65205</link>
    <description>&lt;P&gt;Where are your lines breaking now?  Just every line?  Regardless, a few thoughts...&lt;/P&gt;

&lt;P&gt;First, is the quote (") in front of your TIME_PREFIX a typo?  if not, you probably want to get rid of that.  &lt;/P&gt;

&lt;P&gt;Second, have you tried escaping the curly brace in your line breaker?  I don't think it should need escaped, but might be worth trying. &lt;/P&gt;

&lt;P&gt;Third, do you have these settings on your indexer?  If not, where are they and where are you ingesting the data?&lt;/P&gt;</description>
    <pubDate>Fri, 10 Nov 2017 22:36:06 GMT</pubDate>
    <dc:creator>maciep</dc:creator>
    <dc:date>2017-11-10T22:36:06Z</dc:date>
    <item>
      <title>need help in formatting the data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/need-help-in-formatting-the-data/m-p/357042#M65202</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;

&lt;P&gt;i'm trying to format the "json" formatted data with a custom sourcetype. below are my sample events &lt;BR /&gt;
{"formatVersion":"1.0", "vendor":"BeyondTrust","product":"BeyondInsight","version":"6.3.1","agentid":"PBPS","severity":"0","eventid":"PBPS","eventname":"Requestor","eventdesc":"Request Response Expire","eventdate":"Nov 07 2017 21:31:11","sourcehost":"test-vm-1","sourceip":"127.0.0.1","eventsubject":"0127.0.00.001","eventtype":"0","user":"ssltest", "nvps" : {"clienthost":"test-vm-1", "eventseverity":"0", "logsystemid":"121", "logtime":"11/07/2017 21:31:11", "username":"ssltest", "userid":"2", "roleused":"Requestor", "objecttypeid":"7", "objecttype":"Request Response", "objectid":"14", "operation":"Expire", "failed":"False", "target":"localhost/btuser", "details":"ReleaseRequest #9"}}{"formatVersion":"1.0", "vendor":"BeyondTrust","product":"BeyondInsight","version":"6.3.1","agentid":"PBPS","severity":"0","eventid":"PBPS","eventname":"System","eventdesc":"Release Request Expire","eventdate":"Nov 07 2017 21:31:11","sourcehost":"test-vm-1","sourceip":"127.0.0.1","eventsubject":"0127.0.00.001","eventtype":"0","user":"Internal process","workgroupid":"1","workgroupdesc":"BeyondTrust Workgroup", "nvps" : {"clienthost":"test-vm-1", "eventseverity":"0", "logsystemid":"122", "logtime":"11/07/2017 21:31:11", "username":"Internal process", "userid":"0", "roleused":"System", "objecttypeid":"6", "objecttype":"Release Request", "objectid":"9", "operation":"Expire", "failed":"False", "target":"ManagedSystem=localhost ManagedAccount=btuser", "details":"ReleaseRequest #9, Ticket #, TicketSystem="}}&lt;/P&gt;

&lt;P&gt;and props.conf is &lt;BR /&gt;
"TIME_PREFIX=\"eventdate\":\"&lt;BR /&gt;
TIME_FORMAT= %b %d %Y %H:%M:%S&lt;BR /&gt;
LINE_BREAKER=([\r\n]+)\s*{"formatVersion&lt;BR /&gt;
SHOULD_LINEMERGE=false&lt;BR /&gt;
ANNOTATE_PUNCT=false&lt;BR /&gt;
TRUNCATE = 0&lt;BR /&gt;
KV_MODE=json&lt;BR /&gt;
AUTO_KV_JSON=true"&lt;/P&gt;

&lt;P&gt;i facing issue at line breaker can any one help me? &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:40:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/need-help-in-formatting-the-data/m-p/357042#M65202</guid>
      <dc:creator>saifuddin9122</dc:creator>
      <dc:date>2020-09-29T16:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: need help in formatting the data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/need-help-in-formatting-the-data/m-p/357043#M65203</link>
      <description>&lt;P&gt;You could use props and transforms to extract key values pairs for json events.&lt;/P&gt;

&lt;P&gt;Include this line for the sourcetype in question in the &lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    [sourcetype]
    TIME_PREFIX=\"eventdate\":\"
    TIME_FORMAT= %b %d %Y %H:%M:%S
    LINE_BREAKER=([\r\n]+)\s*{"formatVersion
    SHOULD_LINEMERGE=false
    ANNOTATE_PUNCT=false
    TRUNCATE = 0
    REPORT-json_extraction = json_trans
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and in the respective &lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    [json_trans]
    REGEX = \"([^\":]+)\":\"([^\"\{]+)\"\s*,*\}*
    FORMAT = $1::$2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sometimes, directly using regex works better than auto_kv or kv_mode or spath.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:40:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/need-help-in-formatting-the-data/m-p/357043#M65203</guid>
      <dc:creator>nileena</dc:creator>
      <dc:date>2020-09-29T16:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: need help in formatting the data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/need-help-in-formatting-the-data/m-p/357044#M65204</link>
      <description>&lt;P&gt;i tried it but still same issue.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 18:17:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/need-help-in-formatting-the-data/m-p/357044#M65204</guid>
      <dc:creator>saifuddin9122</dc:creator>
      <dc:date>2017-11-10T18:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: need help in formatting the data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/need-help-in-formatting-the-data/m-p/357045#M65205</link>
      <description>&lt;P&gt;Where are your lines breaking now?  Just every line?  Regardless, a few thoughts...&lt;/P&gt;

&lt;P&gt;First, is the quote (") in front of your TIME_PREFIX a typo?  if not, you probably want to get rid of that.  &lt;/P&gt;

&lt;P&gt;Second, have you tried escaping the curly brace in your line breaker?  I don't think it should need escaped, but might be worth trying. &lt;/P&gt;

&lt;P&gt;Third, do you have these settings on your indexer?  If not, where are they and where are you ingesting the data?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 22:36:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/need-help-in-formatting-the-data/m-p/357045#M65205</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2017-11-10T22:36:06Z</dc:date>
    </item>
  </channel>
</rss>

