<?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 get peak and average TPS for all the service call in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-peak-and-average-TPS-for-all-the-service-call/m-p/533888#M169682</link>
    <description>&lt;P&gt;How to get same values for every one hour in last 24 hours time frame?&lt;/P&gt;</description>
    <pubDate>Tue, 22 Dec 2020 21:00:29 GMT</pubDate>
    <dc:creator>appusplunk14</dc:creator>
    <dc:date>2020-12-22T21:00:29Z</dc:date>
    <item>
      <title>How to get peak and average TPS for all the service call</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-peak-and-average-TPS-for-all-the-service-call/m-p/374792#M169676</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;We are looking for a splunk query using which we have to create a dashboard to show average and maximum TPS for all the services get triggered during the given time frame.&lt;/P&gt;

&lt;P&gt;First we need to calculate the TPS for all the services second wise and then from that data set we have to calculate Max, Min and Avg TPS.&lt;/P&gt;

&lt;P&gt;for example-&lt;BR /&gt;
for service1 and service2 we have below TPS value second  wise (there is no field called TPS, we have to calculate it first)-&lt;BR /&gt;
Time--------Service1 - Service2&lt;BR /&gt;
0:00:01 -------10-----------15&lt;BR /&gt;
0:00:02 -------12-----------18&lt;BR /&gt;
0:00:03 -------14-----------12&lt;BR /&gt;
0:00:04 -------8-----------10&lt;/P&gt;

&lt;P&gt;Then our table should be looking like this-&lt;/P&gt;

&lt;P&gt;Service Name ------------ Max TPS ----------- Min TPS -------- Avg TPS&lt;BR /&gt;
Service1 --------------------     14        -----------     8        ----------    11&lt;BR /&gt;
Service2 --------------------      18       -----------     10      ------------  13.75&lt;/P&gt;

&lt;P&gt;We have used below query which is giving only second wise TPS for each service but not able to apply min, max, avg on that-&lt;BR /&gt;
** Search string  |  timechart count by host span=1s**&lt;/P&gt;

&lt;P&gt;Looking for your support.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Sourav&lt;/P&gt;</description>
      <pubDate>Thu, 03 May 2018 10:21:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-peak-and-average-TPS-for-all-the-service-call/m-p/374792#M169676</guid>
      <dc:creator>sg86sourav</dc:creator>
      <dc:date>2018-05-03T10:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to get peak and average TPS for all the service call</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-peak-and-average-TPS-for-all-the-service-call/m-p/374793#M169677</link>
      <description>&lt;P&gt;Once again... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=whatever yoursearchterms
| bin _time span=1s
| stats count AS TPS by _time service
| stats  max(TPS) AS "NaxTPS" min(TPS) AS "MinTPS" avg(TPS) AS "AVG TPS" by service
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Try this. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Hope that helps - if it does I'd be happy if you would upvote/accept this answer, so others could profit from it. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 May 2018 15:36:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-peak-and-average-TPS-for-all-the-service-call/m-p/374793#M169677</guid>
      <dc:creator>xpac</dc:creator>
      <dc:date>2018-05-03T15:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to get peak and average TPS for all the service call</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-peak-and-average-TPS-for-all-the-service-call/m-p/374794#M169678</link>
      <description>&lt;P&gt;Hi, I have already tried this but it is showing no result found&lt;/P&gt;</description>
      <pubDate>Thu, 03 May 2018 15:49:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-peak-and-average-TPS-for-all-the-service-call/m-p/374794#M169678</guid>
      <dc:creator>sg86sourav</dc:creator>
      <dc:date>2018-05-03T15:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to get peak and average TPS for all the service call</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-peak-and-average-TPS-for-all-the-service-call/m-p/374795#M169679</link>
      <description>&lt;P&gt;Sorry, please try again, I updated my answer. &lt;/P&gt;</description>
      <pubDate>Thu, 03 May 2018 16:50:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-peak-and-average-TPS-for-all-the-service-call/m-p/374795#M169679</guid>
      <dc:creator>xpac</dc:creator>
      <dc:date>2018-05-03T16:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to get peak and average TPS for all the service call</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-peak-and-average-TPS-for-all-the-service-call/m-p/374796#M169680</link>
      <description>&lt;P&gt;Now it is giving the exact result what I was looking for. Thank you very much. Can you please let me know how I can change the average value upto 2 decimal place.&lt;/P&gt;</description>
      <pubDate>Thu, 03 May 2018 17:33:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-peak-and-average-TPS-for-all-the-service-call/m-p/374796#M169680</guid>
      <dc:creator>sg86sourav</dc:creator>
      <dc:date>2018-05-03T17:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to get peak and average TPS for all the service call</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-peak-and-average-TPS-for-all-the-service-call/m-p/374797#M169681</link>
      <description>&lt;P&gt;&lt;CODE&gt;| eval "AVG TPS"=round("AVG TPS", 2)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 May 2018 17:44:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-peak-and-average-TPS-for-all-the-service-call/m-p/374797#M169681</guid>
      <dc:creator>xpac</dc:creator>
      <dc:date>2018-05-03T17:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to get peak and average TPS for all the service call</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-peak-and-average-TPS-for-all-the-service-call/m-p/533888#M169682</link>
      <description>&lt;P&gt;How to get same values for every one hour in last 24 hours time frame?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 21:00:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-peak-and-average-TPS-for-all-the-service-call/m-p/533888#M169682</guid>
      <dc:creator>appusplunk14</dc:creator>
      <dc:date>2020-12-22T21:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to get peak and average TPS for all the service call</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-peak-and-average-TPS-for-all-the-service-call/m-p/620293#M215628</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am trying to get the following results in the table using following query however query seems to be not working correctly can someone please guide on this ?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;RESULTS Expected :&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Consumer MaxTPS&amp;nbsp;MinTPS&amp;nbsp;AvgTPS&amp;nbsp;&lt;SPAN&gt;peakTime&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TEST1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 123&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 60&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;45&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;11/09/22 09:47:08&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Query :&amp;nbsp;&lt;BR /&gt;index=whatever yoursearchterms&lt;BR /&gt;| bin _time span=1s&lt;BR /&gt;| stats count AS TPS by _time service&lt;BR /&gt;|&amp;nbsp;&lt;SPAN&gt;eventstats max(TPS) as peakTPS&lt;BR /&gt;| eval peakTime=if(peakTPS==TPS,_time,null())&lt;/SPAN&gt;&lt;BR /&gt;| stats max(TPS) AS "MaxTPS" min(TPS) AS "MinTPS" avg(TPS) AS "AvgTPS"&amp;nbsp;&lt;SPAN&gt;first(peakTime) as peakTime&lt;/SPAN&gt; by service AS Consumer&lt;BR /&gt;&lt;SPAN&gt;| fieldformat peakTime=strftime(peakTime,"%x %X")&lt;/SPAN&gt;&lt;BR /&gt;| table&amp;nbsp;Consumer MaxTPS&amp;nbsp;MinTPS&amp;nbsp;AvgTPS&amp;nbsp;&lt;SPAN&gt;peakTime&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2022 14:49:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-peak-and-average-TPS-for-all-the-service-call/m-p/620293#M215628</guid>
      <dc:creator>anonymous4</dc:creator>
      <dc:date>2022-11-09T14:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get peak and average TPS for all the service call</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-peak-and-average-TPS-for-all-the-service-call/m-p/696176#M236616</link>
      <description>&lt;P&gt;Could you please confirm what is the updated query ?&lt;/P&gt;
&lt;P&gt;I am using below query. No result found. Please suggest&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=whatever yoursearchterms

| bin _time span=1s

| stats count AS TPS by _time service

| stats  max(TPS) AS "NaxTPS" min(TPS) AS "MinTPS" avg(TPS) AS "AVG TPS" by service&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 13 Aug 2024 20:02:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-peak-and-average-TPS-for-all-the-service-call/m-p/696176#M236616</guid>
      <dc:creator>priyankach</dc:creator>
      <dc:date>2024-08-13T20:02:56Z</dc:date>
    </item>
  </channel>
</rss>

