<?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: How to show max TPS with trendline in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318355#M95267</link>
    <description>&lt;P&gt;Copy/paste that url and you will see that the max_tps is not really the maximum.  There are other higher values there but its not displaying those higher values.  &lt;/P&gt;

&lt;P&gt;for this example, the query is really simple&lt;BR /&gt;
    index=main    | timechart span=1s  count AS TPS | timechart span=1s max(TPS) AS Max_TPS&lt;/P&gt;

&lt;P&gt;the time window is "last 2 minutes" ...super duper simple that it should work without question.   pulling my hair out  &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jan 2018 16:12:01 GMT</pubDate>
    <dc:creator>randy_moore</dc:creator>
    <dc:date>2018-01-18T16:12:01Z</dc:date>
    <item>
      <title>How to show max TPS with trendline</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318346#M95258</link>
      <description>&lt;P&gt;I'm trying to show MAX TPS on a single value panel, with a trendline. &lt;BR /&gt;
Showing just TPS is easy:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;search&amp;gt; earliest=1h   |eval TPS = 1  | timechart per_second(TPS) as TPS
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That works as it should on a singe value panel.&lt;/P&gt;

&lt;P&gt;Now on a second single value  panel I want to show max TPS over the same time period, also with a trendline.     I cant figure out the query to do so using timechart.&lt;/P&gt;

&lt;P&gt;I have a feeling this is Splunk 101 stuff and I should know this but I am stuck.&lt;BR /&gt;
Help please&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 18:12:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318346#M95258</guid>
      <dc:creator>randy_moore</dc:creator>
      <dc:date>2018-01-17T18:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to show max TPS with trendline</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318347#M95259</link>
      <description>&lt;P&gt;hello there:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;try this: &amp;lt;search&amp;gt; earliest=1h   |eval TPS = 1  | timechart span=1s max(TPS) as TPS
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 18:24:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318347#M95259</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-01-17T18:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to show max TPS with trendline</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318348#M95260</link>
      <description>&lt;P&gt;hey this query shows &lt;CODE&gt;avg TPS,max TPS ,max time&lt;/CODE&gt;  in a single search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=&amp;lt;your_index&amp;gt;
 | timechart span=1s count AS TPS
 | eventstats max(TPS) as peakTPS
 | eval peakTime=if(peakTPS==TPS,_time,null())
 | stats avg(TPS) as avgTPS first(peakTPS) as peakTPS first(peakTime) as peakTime
 | fieldformat peakTime=strftime(peakTime,"%x %X")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The eventstats command calculates the peakTPS and then the following eval command determines when that peakTPS occurred.&lt;BR /&gt;
let me know if this helps !&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 18:31:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318348#M95260</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-17T18:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to show max TPS with trendline</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318349#M95261</link>
      <description>&lt;P&gt;sorry @adonio,  I wish it was that easy. &lt;BR /&gt;
what I get is a TPS value of 1 (since I previously defined it with the eval statement).  &lt;/P&gt;

&lt;P&gt;I tried changing it to &lt;EM&gt;timechart span=1s max(count) as TPS&lt;/EM&gt; but that gave me a "0".. not sure why.  I would have thought that would work.   A simple &lt;EM&gt;timechart span=1s count AS TPS&lt;/EM&gt; does give me values, just not the MAX.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 19:03:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318349#M95261</guid>
      <dc:creator>randy_moore</dc:creator>
      <dc:date>2018-01-17T19:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to show max TPS with trendline</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318350#M95262</link>
      <description>&lt;P&gt;I saw that answer too @mayurr98,  but it won't work for me because I need to show a single value, with a trendline.  "stats" since it is does not have a time component will not allow for a trend line to be displayed&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 19:06:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318350#M95262</guid>
      <dc:creator>randy_moore</dc:creator>
      <dc:date>2018-01-17T19:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to show max TPS with trendline</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318351#M95263</link>
      <description>&lt;P&gt;Well you can modify this query&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;your_index&amp;gt;
  | timechart span=1s count AS TPS
  | eventstats max(TPS) as peakTPS
  | timechart span=1s first(peakTPS) as peakTPS
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let me know if this helps !&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 19:14:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318351#M95263</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-17T19:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to show max TPS with trendline</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318352#M95264</link>
      <description>&lt;P&gt;That's closer!  At least I get a value for peakTPS now.&lt;BR /&gt;
What's missing is that the trendline is  flat "0.0".    &lt;/P&gt;

&lt;P&gt;That's  probably due to the eventstats not having a time component.    However changing it to &lt;EM&gt;| eventstats max(TPS) as peakTPS by _time&lt;/EM&gt;  doesn't work either as the last timechart statement will only pick up the first peakTPS value....which isn't the highest.   &lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 19:44:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318352#M95264</guid>
      <dc:creator>randy_moore</dc:creator>
      <dc:date>2018-01-17T19:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to show max TPS with trendline</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318353#M95265</link>
      <description>&lt;P&gt;Okay try this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;your_index&amp;gt; l timechart span=1s count as TPS | timechart max(TPS)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Jan 2018 07:51:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318353#M95265</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-18T07:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to show max TPS with trendline</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318354#M95266</link>
      <description>&lt;P&gt;Well I get a TPS (but not max) and a trendline, so 50/50 &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
I dont thinik I have enough karma to post a direct url of a screenshot... but let me try&lt;/P&gt;

&lt;P&gt;&lt;A href="https://www.screencast.com/t/tVUoz1oYJjAq"&gt;https://www.screencast.com/t/tVUoz1oYJjAq&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 16:09:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318354#M95266</guid>
      <dc:creator>randy_moore</dc:creator>
      <dc:date>2018-01-18T16:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to show max TPS with trendline</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318355#M95267</link>
      <description>&lt;P&gt;Copy/paste that url and you will see that the max_tps is not really the maximum.  There are other higher values there but its not displaying those higher values.  &lt;/P&gt;

&lt;P&gt;for this example, the query is really simple&lt;BR /&gt;
    index=main    | timechart span=1s  count AS TPS | timechart span=1s max(TPS) AS Max_TPS&lt;/P&gt;

&lt;P&gt;the time window is "last 2 minutes" ...super duper simple that it should work without question.   pulling my hair out  &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 16:12:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318355#M95267</guid>
      <dc:creator>randy_moore</dc:creator>
      <dc:date>2018-01-18T16:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to show max TPS with trendline</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318356#M95268</link>
      <description>&lt;P&gt;Adding a comment up here for visibility since the thread is getting deep&lt;/P&gt;

&lt;P&gt;I tried &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main    | timechart span=1s  count AS TPS | timechart span=1s max(TPS) AS Max_TPS
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;using a 2 minute window. &lt;/P&gt;

&lt;P&gt;I do get a TPS value, and a trendline, but not the max TPS.   See this URL for the output:&lt;BR /&gt;&lt;BR /&gt;
&lt;A href="https://www.screencast.com/t/tVUoz1oYJjAq"&gt;https://www.screencast.com/t/tVUoz1oYJjAq&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;You can see that the MAX_TPS is not really displaying the maximum high value&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 16:15:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318356#M95268</guid>
      <dc:creator>randy_moore</dc:creator>
      <dc:date>2018-01-18T16:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to show max TPS with trendline</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318357#M95269</link>
      <description>&lt;P&gt;I think I have it figured out&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main    | eval TPS=1 | timechart per_second(TPS) AS TPS |  timechart span=2m  max(TPS)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;the "span" in the 2nd timechart has to match the time window that I want.   Once I change that, it does give me the max TPS&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 16:36:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318357#M95269</guid>
      <dc:creator>randy_moore</dc:creator>
      <dc:date>2018-01-18T16:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to show max TPS with trendline</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318358#M95270</link>
      <description>&lt;P&gt;@mayurr98 comments led me to the answer.  I  needed a 2nd timechart command that used the same time window.  That gave me the correct max tps and a trendline.&lt;/P&gt;

&lt;P&gt;index=main    | eval TPS=1 | timechart per_second(TPS) AS TPS |  timechart span=2m  max(TPS)&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 16:48:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-max-TPS-with-trendline/m-p/318358#M95270</guid>
      <dc:creator>randy_moore</dc:creator>
      <dc:date>2018-01-18T16:48:53Z</dc:date>
    </item>
  </channel>
</rss>

