<?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 trouble with extracting data from JSON event in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/trouble-with-extracting-data-from-JSON-event/m-p/502448#M85596</link>
    <description>&lt;P&gt;Hi, I am storing the events containing subscribers per subscription topics.&lt;/P&gt;

&lt;P&gt;The events look like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"type":"subscriptions","details":{"topic":"topic1","subscribers":["192.168.74.25","10.132.45.54"]}}
...
{"type":"subscriptions","details":{"topic":"topic2","subscribers":["192.168.74.26","10.132.45.54"]}}
...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to count all subscriptions per subscribers and plot it over time.&lt;/P&gt;

&lt;P&gt;Until now I managed to extract the list of subscribers using this Splunk query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="mysource" | chart values(details.subscribers{}) as subscribers
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I guess I should now use it in subquery ?&lt;/P&gt;

&lt;P&gt;Any help would be appreciated!&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
L.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Oct 2019 13:53:06 GMT</pubDate>
    <dc:creator>lwiechec</dc:creator>
    <dc:date>2019-10-16T13:53:06Z</dc:date>
    <item>
      <title>trouble with extracting data from JSON event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/trouble-with-extracting-data-from-JSON-event/m-p/502448#M85596</link>
      <description>&lt;P&gt;Hi, I am storing the events containing subscribers per subscription topics.&lt;/P&gt;

&lt;P&gt;The events look like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"type":"subscriptions","details":{"topic":"topic1","subscribers":["192.168.74.25","10.132.45.54"]}}
...
{"type":"subscriptions","details":{"topic":"topic2","subscribers":["192.168.74.26","10.132.45.54"]}}
...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to count all subscriptions per subscribers and plot it over time.&lt;/P&gt;

&lt;P&gt;Until now I managed to extract the list of subscribers using this Splunk query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="mysource" | chart values(details.subscribers{}) as subscribers
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I guess I should now use it in subquery ?&lt;/P&gt;

&lt;P&gt;Any help would be appreciated!&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
L.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2019 13:53:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/trouble-with-extracting-data-from-JSON-event/m-p/502448#M85596</guid>
      <dc:creator>lwiechec</dc:creator>
      <dc:date>2019-10-16T13:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: trouble with extracting data from JSON event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/trouble-with-extracting-data-from-JSON-event/m-p/502449#M85597</link>
      <description>&lt;P&gt;This would get you the number of events, which I think is what you mean by subscriptions, per subscriber over time. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="mysource" | eval rename details.subscribers{} as subscribers | mvexpand subscribers | timechart count by subscribers
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Oct 2019 19:23:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/trouble-with-extracting-data-from-JSON-event/m-p/502449#M85597</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2019-10-16T19:23:22Z</dc:date>
    </item>
  </channel>
</rss>

