<?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: REST API Modular Input: How to remove meta data from JSON and split it in to multiple events in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/REST-API-Modular-Input-How-to-remove-meta-data-from-JSON-and/m-p/346412#M41835</link>
    <description>&lt;P&gt;I think you should have a python script which is pulling this data. The best way will be to do this modification in your python script.&lt;/P&gt;</description>
    <pubDate>Wed, 08 Nov 2017 09:04:59 GMT</pubDate>
    <dc:creator>hardikJsheth</dc:creator>
    <dc:date>2017-11-08T09:04:59Z</dc:date>
    <item>
      <title>REST API Modular Input: How to remove meta data from JSON and split it in to multiple events</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/REST-API-Modular-Input-How-to-remove-meta-data-from-JSON-and/m-p/346408#M41831</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;
I am pulling this json from REST input.&lt;BR /&gt;
{"meta":{"bucket":"second","bucketsize":"1","tstart":1510090302753,"tend":1510093902753,"group":{"mname":{"desc":"Monitor name of measurement","type":"string","name":"Monitor Name"},"monid":{"desc":"Slot ID of measurement","type":"number","name":"Slot ID"}},"monid":[22762032],"metrics":{"count":{"desc":"Number of total hits or datapoints","unit":"number","name":"Total number of hits"},"avail":{"desc":"Average Availability of selected Measurements","unit":"%","name":"Availability"},"nwtme":{"desc":"Total time of all network traffic measured by the agent","unit":"ms","name":"Total Network time"},"uxtme":{"desc":"Full User Experience time as reported by the browser","unit":"ms","name":"User Experience"}},"limit":100000,"dbtime":3,"dbname":"db_dt_wa_raw_5 ","apiversion":"48.0.0.201709291816.154491-8"},"data":[{"mname":"NM - SearchAndPurchase_Guest - Chrome Agent","monid":22762032,"count":1,"nwtme":37874,"uxtme":118764,"avail":1,"mtime":1510090652753},{"mname":"NM - SearchAndPurchase_Guest - Chrome Agent","monid":22762032,"count":1,"nwtme":33711,"uxtme":120795,"avail":1,"mtime":1510091094753},{"mname":"NM - SearchAndPurchase_Guest - Chrome Agent","monid":22762032,"count":1,"nwtme":44886,"uxtme":134951,"avail":1,"mtime":1510091548753},{"mname":"NM - SearchAndPurchase_Guest - Chrome Agent","monid":22762032,"count":1,"nwtme":32109,"uxtme":114532,"avail":1,"mtime":1510091999753},{"mname":"NM - SearchAndPurchase_Guest - Chrome Agent","monid":22762032,"count":1,"nwtme":31346,"uxtme":116506,"avail":1,"mtime":1510092457753},{"mname":"NM - SearchAndPurchase_Guest - Chrome Agent","monid":22762032,"count":1,"nwtme":34060,"uxtme":126494,"avail":1,"mtime":1510092909753},{"mname":"NM - SearchAndPurchase_Guest - Chrome Agent","monid":22762032,"count":1,"nwtme":34784,"uxtme":120856,"avail":1,"mtime":1510093359753}]}&lt;/P&gt;

&lt;P&gt;I would like to remove header until "data":[ and last part of json ]}&lt;BR /&gt;
and create multiple events of each array&lt;BR /&gt;
{"mname":"NM - SearchAndPurchase_Guest - Chrome {"mname":"NM - SearchAndPurchase_Guest - Chrome Agent","monid":22762032,"count":1,"nwtme":34784,"uxtme":120856,"avail":1,"mtime":1510093359753}&lt;/P&gt;

&lt;P&gt;I have already added below in prop.conf and restarted but it does not work&lt;BR /&gt;
TIME_PREFIX = \"mtime\":&lt;BR /&gt;
SHOULD_LINEMERGE = false&lt;BR /&gt;
LINE_BREAKER = ,{|}(,){&lt;BR /&gt;
TRUNCATE = 200000&lt;BR /&gt;
SEDCMD-remove_header = s/{\"meta[^[]&lt;EM&gt;[&lt;/EM&gt;//g&lt;BR /&gt;
SEDCMD-remove_footer = s/]}//g&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:35:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/REST-API-Modular-Input-How-to-remove-meta-data-from-JSON-and/m-p/346408#M41831</guid>
      <dc:creator>Aftab_alam</dc:creator>
      <dc:date>2020-09-29T16:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Modular Input: How to remove meta data from JSON and split it in to multiple events</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/REST-API-Modular-Input-How-to-remove-meta-data-from-JSON-and/m-p/346409#M41832</link>
      <description>&lt;P&gt;tried changing SEDCMD&lt;BR /&gt;
[dynatrace_api]&lt;BR /&gt;
TIME_PREFIX = \"mtime\":&lt;BR /&gt;
SHOULD_LINEMERGE = false&lt;BR /&gt;
BREAK_ONLY_BEFORE = ,{&lt;BR /&gt;
LINE_BREAKER = }(,){&lt;BR /&gt;
TRUNCATE = 200000&lt;BR /&gt;
SEDCMD-remove_header = s/{\"meta.*\"data\":[//g&lt;BR /&gt;
SEDCMD-remove_footer = s/]}//g&lt;/P&gt;

&lt;P&gt;it works in search UI but I am still seeing complete json getting indexed&lt;BR /&gt;
index=main  sourcetype=dynatrace_api host="dynatrace-api" | rex field=_raw mode=sed "s/{\"meta.*\"data\":[//g" | rex field=_raw mode=sed "s/]}//g" | table _raw&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:35:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/REST-API-Modular-Input-How-to-remove-meta-data-from-JSON-and/m-p/346409#M41832</guid>
      <dc:creator>Aftab_alam</dc:creator>
      <dc:date>2020-09-29T16:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Modular Input: How to remove meta data from JSON and split it in to multiple events</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/REST-API-Modular-Input-How-to-remove-meta-data-from-JSON-and/m-p/346410#M41833</link>
      <description>&lt;P&gt;added this in prop.confg /etc/apps/search/local/&lt;BR /&gt;
[dynatrace_api]&lt;BR /&gt;
TIME_PREFIX = \"mtime\":&lt;BR /&gt;
SHOULD_LINEMERGE = false&lt;BR /&gt;
BREAK_ONLY_BEFORE = ,{&lt;BR /&gt;
LINE_BREAKER = }(,){&lt;BR /&gt;
TRUNCATE = 200000&lt;BR /&gt;
SEDCMD-remove_header = s/{\"meta.*\"data\":[//g&lt;BR /&gt;
SEDCMD-remove_footer = s/]}//g&lt;/P&gt;

&lt;P&gt;it works in search UI&lt;BR /&gt;
index=main  sourcetype=dynatrace_api host="dynatrace-api" | rex field=_raw mode=sed "s/{\"meta.*\"data\":[//g" | rex field=_raw mode=sed "s/]}//g" | table _raw&lt;BR /&gt;
but I still see complete json is getting indexed&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:35:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/REST-API-Modular-Input-How-to-remove-meta-data-from-JSON-and/m-p/346410#M41833</guid>
      <dc:creator>Aftab_alam</dc:creator>
      <dc:date>2020-09-29T16:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Modular Input: How to remove meta data from JSON and split it in to multiple events</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/REST-API-Modular-Input-How-to-remove-meta-data-from-JSON-and/m-p/346411#M41834</link>
      <description>&lt;P&gt;You should use a custom response handler added to &lt;CODE&gt;rest_ta/bin/responsehandlers.py&lt;/CODE&gt; for this.&lt;/P&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/3787i690565453055E24E/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;&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/3788i489FD61283E8234B/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 05:31:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/REST-API-Modular-Input-How-to-remove-meta-data-from-JSON-and/m-p/346411#M41834</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2017-11-08T05:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Modular Input: How to remove meta data from JSON and split it in to multiple events</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/REST-API-Modular-Input-How-to-remove-meta-data-from-JSON-and/m-p/346412#M41835</link>
      <description>&lt;P&gt;I think you should have a python script which is pulling this data. The best way will be to do this modification in your python script.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 09:04:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/REST-API-Modular-Input-How-to-remove-meta-data-from-JSON-and/m-p/346412#M41835</guid>
      <dc:creator>hardikJsheth</dc:creator>
      <dc:date>2017-11-08T09:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Modular Input: How to remove meta data from JSON and split it in to multiple events</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/REST-API-Modular-Input-How-to-remove-meta-data-from-JSON-and/m-p/346413#M41836</link>
      <description>&lt;P&gt;The REST API Modular Input App is the defacto standard for getting data from REST API's into Splunk for years now. It has a custom pre processor framework (as detailed in my answer below regarding response handlers) for manipulating the raw received HTTP response into the format that you want to index it in Splunk.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 18:52:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/REST-API-Modular-Input-How-to-remove-meta-data-from-JSON-and/m-p/346413#M41836</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2017-11-08T18:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Modular Input: How to remove meta data from JSON and split it in to multiple events</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/REST-API-Modular-Input-How-to-remove-meta-data-from-JSON-and/m-p/346414#M41837</link>
      <description>&lt;P&gt;Thanks for help. it works perfectly&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 19:39:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/REST-API-Modular-Input-How-to-remove-meta-data-from-JSON-and/m-p/346414#M41837</guid>
      <dc:creator>Aftab_alam</dc:creator>
      <dc:date>2017-11-08T19:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Modular Input: How to remove meta data from JSON and split it in to multiple events</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/REST-API-Modular-Input-How-to-remove-meta-data-from-JSON-and/m-p/346415#M41838</link>
      <description>&lt;P&gt;Hi Damien,&lt;BR /&gt;
how do I increase limit for REST input. I am getting this error. increase truncate limit in prop.conf does not help.&lt;BR /&gt;
11-09-2017 10:50:53.087 -0800 WARN  LineBreakingProcessor - Truncating line because limit of 10000 bytes has been exceeded with a line length &amp;gt;= 130439 - data_source="rest://Dynatrace Synthetic Monitors", data_host="portal.dynatrace.com", data_sourcetype="dynatrace_api"&lt;/P&gt;

&lt;P&gt;Thanks for help&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:41:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/REST-API-Modular-Input-How-to-remove-meta-data-from-JSON-and/m-p/346415#M41838</guid>
      <dc:creator>Aftab_alam</dc:creator>
      <dc:date>2020-09-29T16:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Modular Input: How to remove meta data from JSON and split it in to multiple events</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/REST-API-Modular-Input-How-to-remove-meta-data-from-JSON-and/m-p/346416#M41839</link>
      <description>&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/454889/how-to-change-the-the-truncating-limit-in-the-prop-1.html"&gt;https://answers.splunk.com/answers/454889/how-to-change-the-the-truncating-limit-in-the-prop-1.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2017 19:02:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/REST-API-Modular-Input-How-to-remove-meta-data-from-JSON-and/m-p/346416#M41839</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2017-11-09T19:02:00Z</dc:date>
    </item>
  </channel>
</rss>

