<?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: Search same index &amp;amp; source to get total of all &amp;amp; single value for top 10 in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-same-index-amp-source-to-get-total-of-all-amp-single/m-p/635088#M220642</link>
    <description>&lt;LI-CODE lang="markup"&gt;| bin _time span=1d 
| stats sum(repeat_count) as Top_10_Threats_per_Day by _time signature
| sort 0 _time -Top_10_Threats_per_Day
| eventstats sum(Top_10_Threats_per_Day) as TotalCount by _time
| streamstats count by _time
| where count &amp;lt;= 10
| timechart values(TotalCount) as TotalCount sum(Top_10_Threats_per_Day) as Top_10_Threats_per_Day&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 20 Mar 2023 07:57:35 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2023-03-20T07:57:35Z</dc:date>
    <item>
      <title>Search same index &amp; source to get total of all &amp; single value for top 10?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-same-index-amp-source-to-get-total-of-all-amp-single/m-p/635066#M220636</link>
      <description>&lt;P&gt;Individually these searches work:&lt;/P&gt;
&lt;P&gt;```#1 sum all values in field repeat_count in all threat logs that are M,H,C severity```&lt;/P&gt;
&lt;P&gt;index=FW host=InternetFW sourcetype="fw:threat"&amp;nbsp;severity IN (medium, high, critical)&amp;nbsp;| stats sum(repeat_count) as TotalCount&lt;/P&gt;
&lt;P&gt;```#2 sum all repeat_count vailues for the top 10 signatures ```&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=FW host=InternetFW sourcetype="fw:threat" severity IN (medium, high, critical) | stats sum(repeat_count) as Top_10_Threats_per_Day by signature
| sort 10 -Top_10_Threats_per_Day
| stats sum(Top_10_Threats_per_Day) as Top-10&lt;/LI-CODE&gt;
&lt;P&gt;Trying to get the 2 values into a timechart&lt;/P&gt;
&lt;P&gt;|timechart span=1d values(TotalCount) as "&amp;nbsp;Total" , values(Top-10) as "Total of top 10"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tried subsearch {search 1[search 2|fields Top-10]}, Tried multsearch.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2023 14:53:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-same-index-amp-source-to-get-total-of-all-amp-single/m-p/635066#M220636</guid>
      <dc:creator>TerryM</dc:creator>
      <dc:date>2023-03-20T14:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Search same index &amp; source to get total of all &amp; single value for top 10</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-same-index-amp-source-to-get-total-of-all-amp-single/m-p/635070#M220638</link>
      <description>&lt;P&gt;You mention time yet it doesn't appear in your searches&lt;/P&gt;&lt;P&gt;Do you want the top 10 overall and the counts for only those 10 for each day, or the top 10 for each day, which could be different from day to day.&lt;/P&gt;&lt;P&gt;If it is the latter, try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| bin _time span=1d 
| stats sum(repeat_count) as Top_10_Threats_per_Day by _time signature
| sort 0 _time -Top_10_Threats_per_Day
| eventstats sum(Top_10_Threats_per_Day) as TotalCount by _time
| streamstats count by _time
| where count &amp;lt;= 10&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 19 Mar 2023 17:14:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-same-index-amp-source-to-get-total-of-all-amp-single/m-p/635070#M220638</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-19T17:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: Search same index &amp; source to get total of all &amp; single value for top 10</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-same-index-amp-source-to-get-total-of-all-amp-single/m-p/635072#M220639</link>
      <description>&lt;P&gt;time: earliest&amp;nbsp; 5 days ago, latest Beginning of today.&lt;/P&gt;&lt;P&gt;Total of all threats for each day and a single total of the top 10 for each day like this:&lt;/P&gt;&lt;P&gt;Total&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Top 10&lt;/P&gt;&lt;P&gt;8000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2500&lt;/P&gt;&lt;P&gt;2000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 250&lt;/P&gt;&lt;P&gt;1567&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 534&lt;/P&gt;&lt;P&gt;etc&lt;/P&gt;&lt;P&gt;then get it into a timechart.&lt;/P&gt;&lt;P&gt;I can get the Total per day from search #1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Mar 2023 19:12:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-same-index-amp-source-to-get-total-of-all-amp-single/m-p/635072#M220639</guid>
      <dc:creator>TerryM</dc:creator>
      <dc:date>2023-03-19T19:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: Search same index &amp; source to get total of all &amp; single value for top 10</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-same-index-amp-source-to-get-total-of-all-amp-single/m-p/635075#M220640</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TerryM_1-1679254762462.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24368i19D7A23A57CD5911/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TerryM_1-1679254762462.png" alt="TerryM_1-1679254762462.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;index =FW host=InternetFW sourcetype="FW:threat" severity IN (medium, high, critical)&amp;nbsp;&lt;BR /&gt;| timechart span=1d sum(repeat_count) as "Total"&lt;BR /&gt;| appendcols&lt;BR /&gt;[search index =FW host=InternetFW sourcetype="FW:threat" severity IN (medium, high, critical)&amp;nbsp;&lt;BR /&gt;| timechart span=1d sum(repeat_count) as "Top 10" by signature WHERE MAX in top10]&lt;/P&gt;&lt;P&gt;Totals per day works, just need a single Total for the sum of the top 10 events for everything else per day.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Mar 2023 19:40:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-same-index-amp-source-to-get-total-of-all-amp-single/m-p/635075#M220640</guid>
      <dc:creator>TerryM</dc:creator>
      <dc:date>2023-03-19T19:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: Search same index &amp; source to get total of all &amp; single value for top 10</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-same-index-amp-source-to-get-total-of-all-amp-single/m-p/635088#M220642</link>
      <description>&lt;LI-CODE lang="markup"&gt;| bin _time span=1d 
| stats sum(repeat_count) as Top_10_Threats_per_Day by _time signature
| sort 0 _time -Top_10_Threats_per_Day
| eventstats sum(Top_10_Threats_per_Day) as TotalCount by _time
| streamstats count by _time
| where count &amp;lt;= 10
| timechart values(TotalCount) as TotalCount sum(Top_10_Threats_per_Day) as Top_10_Threats_per_Day&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 20 Mar 2023 07:57:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-same-index-amp-source-to-get-total-of-all-amp-single/m-p/635088#M220642</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-20T07:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: Search same index &amp; source to get total of all &amp; single value for top 10</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-same-index-amp-source-to-get-total-of-all-amp-single/m-p/635151#M220672</link>
      <description>&lt;P&gt;Thanks for the replies. This seems to have got what I was looking for. for the numbers that are the same for Total and Top 10, there were only a few Threats&amp;nbsp; those days. Now I just need to decipher how you did it. Did I mention I'm very new to Splunk :).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TerryM_0-1679323359024.png" style="width: 716px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24381i5E39791848716C64/image-dimensions/716x131?v=v2" width="716" height="131" role="button" title="TerryM_0-1679323359024.png" alt="TerryM_0-1679323359024.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2023 14:45:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-same-index-amp-source-to-get-total-of-all-amp-single/m-p/635151#M220672</guid>
      <dc:creator>TerryM</dc:creator>
      <dc:date>2023-03-20T14:45:25Z</dc:date>
    </item>
  </channel>
</rss>

