<?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: Remove the field from a JSON ingested by Splunk in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Remove-the-field-from-a-JSON-ingested-by-Splunk/m-p/542617#M94633</link>
    <description>&lt;P&gt;Hi Ashif,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;have you got any solution for access the fields using spath&lt;/P&gt;</description>
    <pubDate>Fri, 05 Mar 2021 18:03:35 GMT</pubDate>
    <dc:creator>dhirendra_singh</dc:creator>
    <dc:date>2021-03-05T18:03:35Z</dc:date>
    <item>
      <title>Remove the field from a JSON ingested by Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Remove-the-field-from-a-JSON-ingested-by-Splunk/m-p/442129#M94623</link>
      <description>&lt;P&gt;When forwarding alerts to Splunk via SQS, it automatically pushes the entire JSON document into one field, called "BodyJson".&lt;/P&gt;

&lt;P&gt;How would I extract actual fields out of this, so that they are not embedded?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
     "Body": "{\n    \"field_1\": \"test\", \n    \"field_2\": \"10000\", \n    \"field_3\": \"2017-04-20T00:00:00.000Z\", \n    \"field_4\": \"10\"\n}",
     "BodyJson": {
          "field_1": "test",
          "field_2": 10000,
          "field_3": "2017-04-20T00:00:00.000Z",
          "field_4": 10
     }
}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Jun 2018 20:35:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Remove-the-field-from-a-JSON-ingested-by-Splunk/m-p/442129#M94623</guid>
      <dc:creator>kgz25</dc:creator>
      <dc:date>2018-06-08T20:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the field from a JSON ingested by Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Remove-the-field-from-a-JSON-ingested-by-Splunk/m-p/442130#M94624</link>
      <description>&lt;P&gt;| makeresults | eval _raw= "{&lt;BR /&gt;
      \"BodyJson\": {&lt;BR /&gt;
           \"field_1\": \"test\",&lt;BR /&gt;
           \"field_2\": 10000,&lt;BR /&gt;
           \"field_3\": \"2017-04-20T00:00:00.000Z\",&lt;BR /&gt;
           \"field_4\": 10&lt;BR /&gt;
      }&lt;BR /&gt;
 }"|spath&lt;/P&gt;

&lt;P&gt;The above is working. Do you had that Body in the beginning of JSON? &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:57:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Remove-the-field-from-a-JSON-ingested-by-Splunk/m-p/442130#M94624</guid>
      <dc:creator>ansif</dc:creator>
      <dc:date>2020-09-29T19:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the field from a JSON ingested by Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Remove-the-field-from-a-JSON-ingested-by-Splunk/m-p/442131#M94625</link>
      <description>&lt;P&gt;Body is at the beginning and then there is a BodyJson. What I need is to move everything that is in BodyJson into Body and remove BodyJson. Also this should be applied to every new event. SO, I assume I will need to modification of props.conf file.&lt;/P&gt;

&lt;P&gt;Can you assist with this?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 15:33:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Remove-the-field-from-a-JSON-ingested-by-Splunk/m-p/442131#M94625</guid>
      <dc:creator>kgz25</dc:creator>
      <dc:date>2018-06-11T15:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the field from a JSON ingested by Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Remove-the-field-from-a-JSON-ingested-by-Splunk/m-p/442132#M94626</link>
      <description>&lt;P&gt;Why you wanna move like this?May I know what you gonna achieve out of this movement?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 15:38:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Remove-the-field-from-a-JSON-ingested-by-Splunk/m-p/442132#M94626</guid>
      <dc:creator>ansif</dc:creator>
      <dc:date>2018-06-11T15:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the field from a JSON ingested by Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Remove-the-field-from-a-JSON-ingested-by-Splunk/m-p/442133#M94627</link>
      <description>&lt;P&gt;It is needed to extract the actual fields out of this, so that they are not embedded, but top-level fields that can be more easily used for search / reporting.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 18:34:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Remove-the-field-from-a-JSON-ingested-by-Splunk/m-p/442133#M94627</guid>
      <dc:creator>kgz25</dc:creator>
      <dc:date>2018-06-11T18:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the field from a JSON ingested by Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Remove-the-field-from-a-JSON-ingested-by-Splunk/m-p/442134#M94628</link>
      <description>&lt;P&gt;Actual fields can be extracted easily with the above search. Moving to another attribute before extracting is an additional overhead. SPATH can easily extract fields from JSON.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 06:51:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Remove-the-field-from-a-JSON-ingested-by-Splunk/m-p/442134#M94628</guid>
      <dc:creator>ansif</dc:creator>
      <dc:date>2018-06-12T06:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the field from a JSON ingested by Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Remove-the-field-from-a-JSON-ingested-by-Splunk/m-p/442135#M94629</link>
      <description>&lt;P&gt;The problems is that Splunk puts the overall document into "Body.json". I need to completely get rid of this field, so the data is not put into there. &lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 21:44:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Remove-the-field-from-a-JSON-ingested-by-Splunk/m-p/442135#M94629</guid>
      <dc:creator>kgz25</dc:creator>
      <dc:date>2018-06-13T21:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the field from a JSON ingested by Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Remove-the-field-from-a-JSON-ingested-by-Splunk/m-p/442136#M94630</link>
      <description>&lt;P&gt;hello....?&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 13:42:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Remove-the-field-from-a-JSON-ingested-by-Splunk/m-p/442136#M94630</guid>
      <dc:creator>kgz25</dc:creator>
      <dc:date>2018-06-18T13:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the field from a JSON ingested by Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Remove-the-field-from-a-JSON-ingested-by-Splunk/m-p/442137#M94631</link>
      <description>&lt;P&gt;I didn't get you.What you mean by this "The problems is that Splunk puts the overall document into "Body.json". I need to completely get rid of this field, so the data is not put into there"&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 14:04:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Remove-the-field-from-a-JSON-ingested-by-Splunk/m-p/442137#M94631</guid>
      <dc:creator>ansif</dc:creator>
      <dc:date>2018-06-18T14:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the field from a JSON ingested by Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Remove-the-field-from-a-JSON-ingested-by-Splunk/m-p/442138#M94632</link>
      <description>&lt;P&gt;Please look at the example that I posted in my first post. There is a "Body" with the raw data and "BodyJson" with the exact same data, but structured. This is messy and I want to configure Splunk to not do that. Therefore, I need to get rid of the "BodyJson field" from all the events. I am not very well familiar with Splunk and after doing my research, I found out that it could be done by modifying props.conf file. Could you please assist in this?  &lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 14:31:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Remove-the-field-from-a-JSON-ingested-by-Splunk/m-p/442138#M94632</guid>
      <dc:creator>kgz25</dc:creator>
      <dc:date>2018-06-18T14:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the field from a JSON ingested by Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Remove-the-field-from-a-JSON-ingested-by-Splunk/m-p/542617#M94633</link>
      <description>&lt;P&gt;Hi Ashif,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;have you got any solution for access the fields using spath&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 18:03:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Remove-the-field-from-a-JSON-ingested-by-Splunk/m-p/542617#M94633</guid>
      <dc:creator>dhirendra_singh</dc:creator>
      <dc:date>2021-03-05T18:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the field from a JSON ingested by Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Remove-the-field-from-a-JSON-ingested-by-Splunk/m-p/542698#M94634</link>
      <description>&lt;P&gt;Did you get this solved?&lt;/P&gt;&lt;P&gt;A) Splunk is already extracting fields in BodyJson for me (and yes, the field-names are long and undesirable because they are json tucked inside the json of the queue item).&amp;nbsp; It seems to me that creating aliases of those fields is the easy solution to what you've asked.&amp;nbsp; However...&lt;/P&gt;&lt;P&gt;B) What I'm needing to solve is, I think, related to what you were asking: The average size of the original event (i.e., the original size of "Body" field) is ~2k (pretty big). The result of the SQS payload is ~6k. This is largely due, of course, to the fact that the original event is getting sent both as a string (in Body) and as json (in BodyJson). And in my situation, we're talking millions of such events per day ... I need to trim off everything but Body or BodyJson -- whichever Splunk will most effectively parse effectively as json.&lt;/P&gt;&lt;P&gt;I'm wondering if you (or anyone) has already figured out how to do this sort of trimming-at-index-time for AWS SQS messages. (...to preserve and parse just the original message/body.)&lt;/P&gt;</description>
      <pubDate>Sat, 06 Mar 2021 17:30:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Remove-the-field-from-a-JSON-ingested-by-Splunk/m-p/542698#M94634</guid>
      <dc:creator>wryanthomas</dc:creator>
      <dc:date>2021-03-06T17:30:43Z</dc:date>
    </item>
  </channel>
</rss>

