<?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 peaks - replace sum with max in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Timechart-peaks-replace-sum-with-max/m-p/171738#M49226</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;That doesn't seem to do it, I get odd results, and it runs very very slowly.&lt;/P&gt;</description>
    <pubDate>Tue, 04 Mar 2014 15:10:23 GMT</pubDate>
    <dc:creator>rowancoleman</dc:creator>
    <dc:date>2014-03-04T15:10:23Z</dc:date>
    <item>
      <title>Timechart peaks - replace sum with max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-peaks-replace-sum-with-max/m-p/171734#M49222</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I'm looking to create a timechart from a very large dataset. I just want to count the occurrence of a custom value, then limit to the top 10 series which have the highest maximum within the time range. A regular timechart seems to average out the series I'm interested in because it only appears for a short time, even though it has a much higher peak value.&lt;/P&gt;

&lt;P&gt;The docs for timechart seem to describe my issue under the "where clause" description:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;Description: Specifies the criteria for including particular data series when a field is given in the tc-by-clause. The most common use of this option is to select for spikes 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.This has no relation to the where command.&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;I really cannot work out how I use this syntax to prefere maximums instead of sums.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2014 15:36:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-peaks-replace-sum-with-max/m-p/171734#M49222</guid>
      <dc:creator>rowancoleman</dc:creator>
      <dc:date>2014-03-03T15:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart peaks - replace sum with max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-peaks-replace-sum-with-max/m-p/171735#M49223</link>
      <description>&lt;P&gt;can you post your search here.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2014 18:36:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-peaks-replace-sum-with-max/m-p/171735#M49223</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-03-03T18:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart peaks - replace sum with max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-peaks-replace-sum-with-max/m-p/171736#M49224</link>
      <description>&lt;P&gt;I can give an example of a search, but this is more of a general query.&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;| eval attack_flow = src_port + "-&amp;gt;" + dst_ip | timechart count by attack_flow useother=false usenull=false&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;This returns the top 10 'attack_flow' over a time range. But the top 10 is based on the sum count, rather than the max count.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:02:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-peaks-replace-sum-with-max/m-p/171736#M49224</guid>
      <dc:creator>rowancoleman</dc:creator>
      <dc:date>2020-09-28T16:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart peaks - replace sum with max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-peaks-replace-sum-with-max/m-p/171737#M49225</link>
      <description>&lt;P&gt;Hi rowancoleman,&lt;/P&gt;

&lt;P&gt;if I get your question correct, then you can use something like this to get the &lt;CODE&gt;max count&lt;/CODE&gt; for each &lt;CODE&gt;attack_flow&lt;/CODE&gt;:  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | eval attack_flow = src_port + "-&amp;gt;" + dst_ip | stats count by attack_flow, _time | timechart max(count) AS max by attack_flow useother=f usenull=f
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;the &lt;CODE&gt;stats&lt;/CODE&gt; will take care of the counting for each &lt;CODE&gt;attack_flow&lt;/CODE&gt; and the &lt;CODE&gt;timechart&lt;/CODE&gt; will display the max for each &lt;CODE&gt;attack_flow&lt;/CODE&gt;. &lt;/P&gt;

&lt;P&gt;hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2014 13:00:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-peaks-replace-sum-with-max/m-p/171737#M49225</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-03-04T13:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart peaks - replace sum with max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-peaks-replace-sum-with-max/m-p/171738#M49226</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;That doesn't seem to do it, I get odd results, and it runs very very slowly.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2014 15:10:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-peaks-replace-sum-with-max/m-p/171738#M49226</guid>
      <dc:creator>rowancoleman</dc:creator>
      <dc:date>2014-03-04T15:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart peaks - replace sum with max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-peaks-replace-sum-with-max/m-p/171739#M49227</link>
      <description>&lt;P&gt;take a look at this example:&lt;BR /&gt;
&lt;CODE&gt;index=_internal source=*metrics.log series=splunkd* earliest=-24h@h | bucket _time span=1m | stats count as c_series by series, _time | timechart max(c_series) AS max min(c_series) AS min by series useother=f usenull=f&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;this will search the last 24 hours on index _internal for &lt;CODE&gt;splunkd*&lt;/CODE&gt; events in &lt;CODE&gt;metrics.log&lt;/CODE&gt;, create one minute &lt;CODE&gt;buckets&lt;/CODE&gt;, &lt;CODE&gt;count&lt;/CODE&gt; each occurrence of series in those buckets and displays a &lt;CODE&gt;timechart&lt;/CODE&gt; of &lt;CODE&gt;max&lt;/CODE&gt; and &lt;CODE&gt;min&lt;/CODE&gt; count for each series.&lt;BR /&gt;
Adapt it to match your search and needs and your ready to go.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 08:46:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-peaks-replace-sum-with-max/m-p/171739#M49227</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-03-05T08:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart peaks - replace sum with max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-peaks-replace-sum-with-max/m-p/171740#M49228</link>
      <description>&lt;P&gt;I tried to adapt your comment to fit my case, but it doesn't seem quite right: &lt;A href="https://i.imgur.com/GjvilZn.png"&gt;https://i.imgur.com/GjvilZn.png&lt;/A&gt; It seems like a very similar set of series were picked, but with the Y values squished by about 1/5. I posted a related question, could you please take a look if you're free? &lt;A href="https://answers.splunk.com/answers/815185"&gt;https://answers.splunk.com/answers/815185&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 17:08:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-peaks-replace-sum-with-max/m-p/171740#M49228</guid>
      <dc:creator>amomchilov</dc:creator>
      <dc:date>2020-04-06T17:08:13Z</dc:date>
    </item>
  </channel>
</rss>

