<?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: Aggregate report on a multi-value field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Aggregate-report-on-a-multi-value-field/m-p/33447#M7108</link>
    <description>&lt;P&gt;Is there a way to get urls in the report?&lt;/P&gt;</description>
    <pubDate>Tue, 13 Aug 2013 19:09:11 GMT</pubDate>
    <dc:creator>chiwang</dc:creator>
    <dc:date>2013-08-13T19:09:11Z</dc:date>
    <item>
      <title>Aggregate report on a multi-value field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Aggregate-report-on-a-multi-value-field/m-p/33443#M7104</link>
      <description>&lt;P&gt;I have a data set like the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;01/21/2013  /root1/url,/root2/url,/root2/url
02/22/2013  /root1/url,/root3/url 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and I would like to generate a report like the following&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;event    root   count    urls
1        root1  1        /root1/url
1        root2  2        /root2/url
                         /root2/url 
2        root1  1        /root1/url
2        root3  1        /root3/url 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is there a way to get what I want using splunk functions where urls are filterd by root in the same row. I was able to use "makemv" and "streamstats" to get the first 3 fields but not able to filter urls based on root value.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2013 18:03:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Aggregate-report-on-a-multi-value-field/m-p/33443#M7104</guid>
      <dc:creator>chiwang</dc:creator>
      <dc:date>2013-08-13T18:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate report on a multi-value field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Aggregate-report-on-a-multi-value-field/m-p/33444#M7105</link>
      <description>&lt;P&gt;is the log contains the time/ its just /root1/url,/root2/url,/root2/url ?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2013 18:28:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Aggregate-report-on-a-multi-value-field/m-p/33444#M7105</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2013-08-13T18:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate report on a multi-value field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Aggregate-report-on-a-multi-value-field/m-p/33445#M7106</link>
      <description>&lt;P&gt;The log has the time and a list of comma separated URLs.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2013 18:56:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Aggregate-report-on-a-multi-value-field/m-p/33445#M7106</guid>
      <dc:creator>chiwang</dc:creator>
      <dc:date>2013-08-13T18:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate report on a multi-value field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Aggregate-report-on-a-multi-value-field/m-p/33446#M7107</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
Please try this. There may be other answers but i do like this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Sourcetype=blah|rex field=_raw "(?&amp;lt;evt&amp;gt;(?=\s).+)"|eval t=split(evt,",")|mvexpand t|rex field=t "(?&amp;lt;Root&amp;gt;(?!/)\w+(?=/))"|stats count by Root,t|rename t as URL
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;2nd option:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=blah|rex field=_raw "(?&amp;lt;evt&amp;gt;(?=\s).+)"|eval URL=split(evt,",")|mvexpand URL|rex field=URL "(?&amp;lt;Root&amp;gt;(?!/)\w+(?=/))"|eval Timestamp=strftime(_time,"%d/%m/%Y %I:%M:%S %p")|Table Timestamp,Root,URL|eventstats count(URL) as count by Timestamp,Root|dedup Timestamp,Root
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2013 18:58:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Aggregate-report-on-a-multi-value-field/m-p/33446#M7107</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2013-08-13T18:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate report on a multi-value field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Aggregate-report-on-a-multi-value-field/m-p/33447#M7108</link>
      <description>&lt;P&gt;Is there a way to get urls in the report?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2013 19:09:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Aggregate-report-on-a-multi-value-field/m-p/33447#M7108</guid>
      <dc:creator>chiwang</dc:creator>
      <dc:date>2013-08-13T19:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate report on a multi-value field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Aggregate-report-on-a-multi-value-field/m-p/33448#M7109</link>
      <description>&lt;P&gt;Updated the answer, but it's not the same as you gave in the question&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2013 19:26:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Aggregate-report-on-a-multi-value-field/m-p/33448#M7109</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2013-08-13T19:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate report on a multi-value field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Aggregate-report-on-a-multi-value-field/m-p/33449#M7110</link>
      <description>&lt;P&gt;Thanks. But I would like to have a list of URLs (even if they are duplicated) for reporting purposes.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2013 19:44:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Aggregate-report-on-a-multi-value-field/m-p/33449#M7110</guid>
      <dc:creator>chiwang</dc:creator>
      <dc:date>2013-08-13T19:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate report on a multi-value field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Aggregate-report-on-a-multi-value-field/m-p/33450#M7111</link>
      <description>&lt;P&gt;I have added another query, this the best i can think as of now.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2013 20:35:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Aggregate-report-on-a-multi-value-field/m-p/33450#M7111</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2013-08-13T20:35:36Z</dc:date>
    </item>
  </channel>
</rss>

