<?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 Receiving multiple json events as one from third party application in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Receiving-multiple-json-events-as-one-from-third-party/m-p/533656#M89618</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I`m receiving multiple JSON events as one event from third party application as showned below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"metric":"host1.adapter.DEMO.ALL.in.error","event":"metric","type":"m","value":0}
{"metric":"host1.adapter.DEMO.ALL.in.filter","event":"metric","type":"m","value":0}
{"metric":"host1.adapter.DEMO.ALL.in.total","event":"metric","type":"m","value":996}
{"metric":"host1.adapter.DEMO.ALL.out.error","event":"metric","type":"m","value":0}
{"metric":"host1.adapter.DEMO.ALL.out.total","event":"metric","type":"m","value":996}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried to use &lt;/SPAN&gt;spath&lt;SPAN&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;/SPAN&gt;mvexpand&lt;SPAN&gt;&amp;nbsp;commands&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; to split it to a separate events.&lt;SPAN&gt;&amp;nbsp;But couldn`t get results&amp;nbsp; as i expected.&lt;BR /&gt;Finnaly, i need to apply my&amp;nbsp; search to get total count by separate metric value as shown below:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;source="tcp:10244" sourcetype="json_no_timestamp"| spath metric | search metric=" host1.adapter.DEMO.WebLogicInputFlow.out.total " | sort _time | autoregress "value" p=1 | eval diff=if(value&amp;gt;value_p1, max(value)-min(value_p1), null())  | timechart span=60s sum(diff) as total_count&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;here is my props.conf lines:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="line"&gt;[&lt;SPAN class="n"&gt;adapter&lt;/SPAN&gt;:&lt;SPAN class="n"&gt;json&lt;/SPAN&gt;]&lt;/SPAN&gt;
&lt;SPAN class="line"&gt;&lt;SPAN class="n"&gt;INDEXED_EXTRACTIONS&lt;/SPAN&gt; = &lt;SPAN class="n"&gt;json&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="line"&gt;&lt;SPAN class="n"&gt;KV_MODE&lt;/SPAN&gt; = &lt;SPAN class="n"&gt;none&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="line"&gt;&lt;SPAN class="n"&gt;AUTO_KV_JSON&lt;/SPAN&gt; = &lt;SPAN class="n"&gt;false&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;Any help is appreciated.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 19 Dec 2020 17:25:41 GMT</pubDate>
    <dc:creator>aitymm</dc:creator>
    <dc:date>2020-12-19T17:25:41Z</dc:date>
    <item>
      <title>Receiving multiple json events as one from third party application</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Receiving-multiple-json-events-as-one-from-third-party/m-p/533656#M89618</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I`m receiving multiple JSON events as one event from third party application as showned below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"metric":"host1.adapter.DEMO.ALL.in.error","event":"metric","type":"m","value":0}
{"metric":"host1.adapter.DEMO.ALL.in.filter","event":"metric","type":"m","value":0}
{"metric":"host1.adapter.DEMO.ALL.in.total","event":"metric","type":"m","value":996}
{"metric":"host1.adapter.DEMO.ALL.out.error","event":"metric","type":"m","value":0}
{"metric":"host1.adapter.DEMO.ALL.out.total","event":"metric","type":"m","value":996}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried to use &lt;/SPAN&gt;spath&lt;SPAN&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;/SPAN&gt;mvexpand&lt;SPAN&gt;&amp;nbsp;commands&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; to split it to a separate events.&lt;SPAN&gt;&amp;nbsp;But couldn`t get results&amp;nbsp; as i expected.&lt;BR /&gt;Finnaly, i need to apply my&amp;nbsp; search to get total count by separate metric value as shown below:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;source="tcp:10244" sourcetype="json_no_timestamp"| spath metric | search metric=" host1.adapter.DEMO.WebLogicInputFlow.out.total " | sort _time | autoregress "value" p=1 | eval diff=if(value&amp;gt;value_p1, max(value)-min(value_p1), null())  | timechart span=60s sum(diff) as total_count&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;here is my props.conf lines:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="line"&gt;[&lt;SPAN class="n"&gt;adapter&lt;/SPAN&gt;:&lt;SPAN class="n"&gt;json&lt;/SPAN&gt;]&lt;/SPAN&gt;
&lt;SPAN class="line"&gt;&lt;SPAN class="n"&gt;INDEXED_EXTRACTIONS&lt;/SPAN&gt; = &lt;SPAN class="n"&gt;json&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="line"&gt;&lt;SPAN class="n"&gt;KV_MODE&lt;/SPAN&gt; = &lt;SPAN class="n"&gt;none&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="line"&gt;&lt;SPAN class="n"&gt;AUTO_KV_JSON&lt;/SPAN&gt; = &lt;SPAN class="n"&gt;false&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;Any help is appreciated.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Dec 2020 17:25:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Receiving-multiple-json-events-as-one-from-third-party/m-p/533656#M89618</guid>
      <dc:creator>aitymm</dc:creator>
      <dc:date>2020-12-19T17:25:41Z</dc:date>
    </item>
  </channel>
</rss>

