<?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: timechart limit: pick top 10 series with the highest peaks (of all time), not total sums in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/timechart-limit-pick-top-10-series-with-the-highest-peaks-of-all/m-p/467307#M131508</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;...
| timechart useother=f span=5m count by client_ip where sum in top10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;try &lt;CODE&gt;where&lt;/CODE&gt; clause.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Apr 2020 20:21:29 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-04-06T20:21:29Z</dc:date>
    <item>
      <title>timechart limit: pick top 10 series with the highest peaks (of all time), not total sums</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-limit-pick-top-10-series-with-the-highest-peaks-of-all/m-p/467306#M131507</link>
      <description>&lt;P&gt;I'm looking to investigate IP addresses with highest peak loads on our service. Here's my current query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;application="my-app" index="my-index" request client_ip="*" user_agent="*" request="*" kube_pod="web-*"
| timechart limit=10 useother=f span="5minute" count by client_ip
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It works, and it's &lt;EM&gt;almost&lt;/EM&gt; what I'm looking for. The documentation states:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;If a single aggregation is specified, the score is based on the sum of the values in the aggregation for that split-by value. For example, for &lt;CODE&gt;timechart avg(foo) BY &amp;lt;field&amp;gt;&lt;/CODE&gt; the &lt;CODE&gt;avg(foo)&lt;/CODE&gt; values are added up for each value of  to determine the scores.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;If I understand this correctly, &lt;CODE&gt;timeseries&lt;/CODE&gt; is picking the top &lt;CODE&gt;10&lt;/CODE&gt; series whose sum of &lt;CODE&gt;count&lt;/CODE&gt;s over the time span are the greatest. That is to say, it's picking the &lt;CODE&gt;10&lt;/CODE&gt; top series by greatest integral.&lt;/P&gt;

&lt;P&gt;Instead, I want to select the &lt;CODE&gt;10&lt;/CODE&gt; top series with the highest peak values (of any time in the timespan). For example, if there's a single data point that shows 10,000 requests per second for a single second, I want to be chosen over another series that shows 10 requests/second for months straight (whose integral would be much greater, but with a much lower max peak).&lt;/P&gt;

&lt;P&gt;Could you please help me do that?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 16:18:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-limit-pick-top-10-series-with-the-highest-peaks-of-all/m-p/467306#M131507</guid>
      <dc:creator>amomchilov</dc:creator>
      <dc:date>2020-04-06T16:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: timechart limit: pick top 10 series with the highest peaks (of all time), not total sums</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-limit-pick-top-10-series-with-the-highest-peaks-of-all/m-p/467307#M131508</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;...
| timechart useother=f span=5m count by client_ip where sum in top10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;try &lt;CODE&gt;where&lt;/CODE&gt; clause.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 20:21:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-limit-pick-top-10-series-with-the-highest-peaks-of-all/m-p/467307#M131508</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-06T20:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: timechart limit: pick top 10 series with the highest peaks (of all time), not total sums</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-limit-pick-top-10-series-with-the-highest-peaks-of-all/m-p/467308#M131509</link>
      <description>&lt;P&gt;Ah, I hadn't looked at that. From the docs it seems promising:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Specifies the criteria for including particular data series when a field is given in the . The most common use of this option is to look for spikes in your data rather than overall mass of distribution in series selection. The default value finds the top ten series by area under the curve. Alternately one could replace sum with max to find the series with the ten highest spikes. Essentially the default is the same as specifying where sum in top10. The  has no relation to the where command.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;I'll give it a shot and report back. How do &lt;CODE&gt;where&lt;/CODE&gt; and &lt;CODE&gt;limit&lt;/CODE&gt; interact?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 20:45:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-limit-pick-top-10-series-with-the-highest-peaks-of-all/m-p/467308#M131509</guid>
      <dc:creator>amomchilov</dc:creator>
      <dc:date>2020-04-06T20:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: timechart limit: pick top 10 series with the highest peaks (of all time), not total sums</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-limit-pick-top-10-series-with-the-highest-peaks-of-all/m-p/467309#M131510</link>
      <description>&lt;P&gt;Woo, that worked great!&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 21:05:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-limit-pick-top-10-series-with-the-highest-peaks-of-all/m-p/467309#M131510</guid>
      <dc:creator>amomchilov</dc:creator>
      <dc:date>2020-04-06T21:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: timechart limit: pick top 10 series with the highest peaks (of all time), not total sums</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-limit-pick-top-10-series-with-the-highest-peaks-of-all/m-p/467310#M131511</link>
      <description>&lt;P&gt;&lt;CODE&gt;.... where max in top10&lt;/CODE&gt;&lt;BR /&gt;
It was this.&lt;BR /&gt;
&lt;CODE&gt;limit&lt;/CODE&gt;handle the count of result.&lt;BR /&gt;
&lt;CODE&gt;where&lt;/CODE&gt; handle the result.&lt;BR /&gt;
I think so.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 21:10:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-limit-pick-top-10-series-with-the-highest-peaks-of-all/m-p/467310#M131511</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-06T21:10:59Z</dc:date>
    </item>
  </channel>
</rss>

