<?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: sum question in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/sum-question/m-p/85246#M21763</link>
    <description>&lt;P&gt;like this ?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="_internal" source="*license_usage.log" (s=*win* OR s=abc) 
| eval s=if(s=="abc","abc","win")
| stats sum(b) as gb by s
| eval gb=gb/1024/1024/1024
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 04 Apr 2013 19:26:50 GMT</pubDate>
    <dc:creator>jonuwz</dc:creator>
    <dc:date>2013-04-04T19:26:50Z</dc:date>
    <item>
      <title>sum question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/sum-question/m-p/85245#M21762</link>
      <description>&lt;P&gt;I would like to analyze two different sources to determine how much data is being indexed.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="_internal" source="*license_usage.log" s=*win*| stats count sum(b) by s | rename "sum(b)" as total_bytes | stats sum(total_bytes) | rename "sum(total_bytes)" as total | eval gb=total/1024/1024/1024
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For the search above, there are 5 or 6 sources, so I want a count of the total gb used and this works.&lt;/P&gt;

&lt;P&gt;What I really want is to be able to change the search to something like this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="_internal" source="*license_usage.log" s=*win* s=abc| stats count sum(b) by s | rename "sum(b)" as total_bytes | stats sum(total_bytes) | rename "sum(total_bytes)" as total | eval gb=total/1024/1024/1024
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;BUT,  I want a sum of the &lt;CODE&gt;s=*win*&lt;/CODE&gt; and a sum of &lt;CODE&gt;s=abc&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Ideas?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2013 18:38:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/sum-question/m-p/85245#M21762</guid>
      <dc:creator>mcbradford</dc:creator>
      <dc:date>2013-04-04T18:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: sum question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/sum-question/m-p/85246#M21763</link>
      <description>&lt;P&gt;like this ?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="_internal" source="*license_usage.log" (s=*win* OR s=abc) 
| eval s=if(s=="abc","abc","win")
| stats sum(b) as gb by s
| eval gb=gb/1024/1024/1024
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Apr 2013 19:26:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/sum-question/m-p/85246#M21763</guid>
      <dc:creator>jonuwz</dc:creator>
      <dc:date>2013-04-04T19:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: sum question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/sum-question/m-p/85247#M21764</link>
      <description>&lt;P&gt;ok - so to add to complexity....&lt;/P&gt;

&lt;P&gt;This work great, I would like to take my count of systems per s and determine the mb used per system.&lt;/P&gt;

&lt;P&gt;I was using something like to but I had to run a search for each group.&lt;/P&gt;

&lt;P&gt;index="_internal" source="*license_usage.log" s=abc| stats sum(b) by s | rename "sum(b)" as total_bytes | stats sum(total_bytes) | rename "sum(total_bytes)" as total | eval gb=total/1024/1024/1024 | eval mb=total/1024/1024 | eval mb_per_system=mb/31&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:40:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/sum-question/m-p/85247#M21764</guid>
      <dc:creator>mcbradford</dc:creator>
      <dc:date>2020-09-28T13:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: sum question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/sum-question/m-p/85248#M21765</link>
      <description>&lt;P&gt;what systems ? where does 31 come from ? how will "per s" work given we're wilcarding &lt;EM&gt;win&lt;/EM&gt; to get the sum ? &lt;/P&gt;

&lt;P&gt;You need to be more specific with your examples&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2013 22:54:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/sum-question/m-p/85248#M21765</guid>
      <dc:creator>jonuwz</dc:creator>
      <dc:date>2013-04-04T22:54:18Z</dc:date>
    </item>
  </channel>
</rss>

