<?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 How do I count and sum multivalue fields by another multivalue field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-and-sum-multivalue-fields-by-another-multivalue/m-p/379359#M111155</link>
    <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I am hitting a dead end with my search...&lt;/P&gt;

&lt;P&gt;I have two multivalue fields:&lt;/P&gt;

&lt;P&gt;Site_ID - has 100's of values&lt;BR /&gt;
Attack - has 10 values&lt;/P&gt;

&lt;P&gt;I want a report that shows the count of individual attacks and total attacks by Site_ID&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Site_ID                     XSS         SQLi    Total by Site
my.site.com              10           12         24
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have been using this as a base search &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=Firewall sourcetype=Firewall_logs
Attack = SQLi OR
Attack = xSS OR
| chart count over Site_ID by Attack
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But I just cannot find the right syntax to produce the needed report.&lt;/P&gt;

&lt;P&gt;Any help would be greatly appreciated!&lt;/P&gt;</description>
    <pubDate>Thu, 20 Dec 2018 20:34:56 GMT</pubDate>
    <dc:creator>Log_wrangler</dc:creator>
    <dc:date>2018-12-20T20:34:56Z</dc:date>
    <item>
      <title>How do I count and sum multivalue fields by another multivalue field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-and-sum-multivalue-fields-by-another-multivalue/m-p/379359#M111155</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I am hitting a dead end with my search...&lt;/P&gt;

&lt;P&gt;I have two multivalue fields:&lt;/P&gt;

&lt;P&gt;Site_ID - has 100's of values&lt;BR /&gt;
Attack - has 10 values&lt;/P&gt;

&lt;P&gt;I want a report that shows the count of individual attacks and total attacks by Site_ID&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Site_ID                     XSS         SQLi    Total by Site
my.site.com              10           12         24
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have been using this as a base search &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=Firewall sourcetype=Firewall_logs
Attack = SQLi OR
Attack = xSS OR
| chart count over Site_ID by Attack
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But I just cannot find the right syntax to produce the needed report.&lt;/P&gt;

&lt;P&gt;Any help would be greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 20 Dec 2018 20:34:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-and-sum-multivalue-fields-by-another-multivalue/m-p/379359#M111155</guid>
      <dc:creator>Log_wrangler</dc:creator>
      <dc:date>2018-12-20T20:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do I count and sum multivalue fields by another multivalue field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-and-sum-multivalue-fields-by-another-multivalue/m-p/379360#M111156</link>
      <description>&lt;P&gt;The &lt;CODE&gt;stats&lt;/CODE&gt;, &lt;CODE&gt;chart&lt;/CODE&gt;, and &lt;CODE&gt;timechart&lt;/CODE&gt; commands are all multi-value-safe so all that you need is a total column?  That is cake, just add &lt;CODE&gt;| addtotals row=t col=f fieldname="Total by Site"&lt;/CODE&gt;.  See this run-anywhere example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_* 
| rename sourcetype AS Attack, host AS Site_ID 
| chart count OVER Site_ID BY Attack
| addtotals row=t col=f fieldname="Total by Site"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Dec 2018 21:22:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-and-sum-multivalue-fields-by-another-multivalue/m-p/379360#M111156</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-12-20T21:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I count and sum multivalue fields by another multivalue field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-and-sum-multivalue-fields-by-another-multivalue/m-p/379361#M111157</link>
      <description>&lt;P&gt;Thanks, you're right... cake, forgot how to do it.   &lt;/P&gt;</description>
      <pubDate>Thu, 20 Dec 2018 21:56:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-and-sum-multivalue-fields-by-another-multivalue/m-p/379361#M111157</guid>
      <dc:creator>Log_wrangler</dc:creator>
      <dc:date>2018-12-20T21:56:16Z</dc:date>
    </item>
  </channel>
</rss>

