<?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 Different Ranges queries in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Different-Ranges-queries/m-p/57107#M751</link>
    <description>&lt;P&gt;Hello. I need to calculate statistics like Avg, Count, from the past two weeks period.&lt;/P&gt;

&lt;P&gt;What I want to do next is to check if the same measure in the days AFTER those two weeks are above it or not. &lt;/P&gt;

&lt;P&gt;I Can't figure out if it is a join, append or something else to write... Here is what I've got:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
index="pt_app_siebel" SWEMethod="ReconfigureCXProd" starttime=8/25/2013:00:00:00 latest=-24h date_wday=friday date_hour=15&lt;BR /&gt;
| eventstats perc25(executiontime) as Q1Tempo, perc75(executiontime) as Q3Tempo &lt;BR /&gt;
| eval lim1=Q3Tempo+3*(Q3Tempo-Q1Tempo) &lt;BR /&gt;
| eval lim2=Q3Tempo+6*(Q3Tempo-Q1Tempo)&lt;BR /&gt;
| eval lim3=Q3Tempo+10*(Q3Tempo-Q1Tempo) &lt;BR /&gt;
| eval Performance=case(executiontime&amp;gt;lim3,"High_Alert",executiontime&amp;gt;lim2,"Mid_Alert",executiontime&amp;gt;lim1,"Low_Alert",executiontime&amp;lt;lim1,"OK") &lt;BR /&gt;
| eval Low=if(executiontime&amp;gt;lim1 AND executiontime&amp;lt;lim2,1,0) &lt;BR /&gt;
| eval Mid=if(executiontime&amp;gt;lim2 AND executiontime&amp;lt;lim3,1,0) &lt;BR /&gt;
| eval High=if(executiontime&amp;gt;lim3,1,0) &lt;BR /&gt;
| eval OutQ=if(executiontime&amp;gt;lim1,1,0) &lt;BR /&gt;
| stats avg(OutQ) as AvgOut,avg(Low) as AvgLow, avg(Mid) as AvgMid,avg(High) as AvgHigh&lt;BR /&gt;
&lt;/CODE&gt;&lt;BR /&gt;
Now I want to get those Avg and see where executiontime in the period&lt;/P&gt;

&lt;P&gt;index="pt_app_siebel" SWEMethod="ReconfigureCXProd" starttime=9/6/2013:00:00:00 latest=now date_wday=friday date_hour=15&lt;/P&gt;

&lt;P&gt;is going. Can you help please?&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 14:43:47 GMT</pubDate>
    <dc:creator>TiagoMatos</dc:creator>
    <dc:date>2020-09-28T14:43:47Z</dc:date>
    <item>
      <title>Different Ranges queries</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Different-Ranges-queries/m-p/57107#M751</link>
      <description>&lt;P&gt;Hello. I need to calculate statistics like Avg, Count, from the past two weeks period.&lt;/P&gt;

&lt;P&gt;What I want to do next is to check if the same measure in the days AFTER those two weeks are above it or not. &lt;/P&gt;

&lt;P&gt;I Can't figure out if it is a join, append or something else to write... Here is what I've got:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
index="pt_app_siebel" SWEMethod="ReconfigureCXProd" starttime=8/25/2013:00:00:00 latest=-24h date_wday=friday date_hour=15&lt;BR /&gt;
| eventstats perc25(executiontime) as Q1Tempo, perc75(executiontime) as Q3Tempo &lt;BR /&gt;
| eval lim1=Q3Tempo+3*(Q3Tempo-Q1Tempo) &lt;BR /&gt;
| eval lim2=Q3Tempo+6*(Q3Tempo-Q1Tempo)&lt;BR /&gt;
| eval lim3=Q3Tempo+10*(Q3Tempo-Q1Tempo) &lt;BR /&gt;
| eval Performance=case(executiontime&amp;gt;lim3,"High_Alert",executiontime&amp;gt;lim2,"Mid_Alert",executiontime&amp;gt;lim1,"Low_Alert",executiontime&amp;lt;lim1,"OK") &lt;BR /&gt;
| eval Low=if(executiontime&amp;gt;lim1 AND executiontime&amp;lt;lim2,1,0) &lt;BR /&gt;
| eval Mid=if(executiontime&amp;gt;lim2 AND executiontime&amp;lt;lim3,1,0) &lt;BR /&gt;
| eval High=if(executiontime&amp;gt;lim3,1,0) &lt;BR /&gt;
| eval OutQ=if(executiontime&amp;gt;lim1,1,0) &lt;BR /&gt;
| stats avg(OutQ) as AvgOut,avg(Low) as AvgLow, avg(Mid) as AvgMid,avg(High) as AvgHigh&lt;BR /&gt;
&lt;/CODE&gt;&lt;BR /&gt;
Now I want to get those Avg and see where executiontime in the period&lt;/P&gt;

&lt;P&gt;index="pt_app_siebel" SWEMethod="ReconfigureCXProd" starttime=9/6/2013:00:00:00 latest=now date_wday=friday date_hour=15&lt;/P&gt;

&lt;P&gt;is going. Can you help please?&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:43:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Different-Ranges-queries/m-p/57107#M751</guid>
      <dc:creator>TiagoMatos</dc:creator>
      <dc:date>2020-09-28T14:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: Different Ranges queries</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Different-Ranges-queries/m-p/57108#M752</link>
      <description>&lt;P&gt;Format code blocks by blank lines before and after + 4 spaces at the start of each line, please.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2013 18:00:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Different-Ranges-queries/m-p/57108#M752</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-09-06T18:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: Different Ranges queries</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Different-Ranges-queries/m-p/57109#M753</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index="pt_app_siebel" SWEMethod="ReconfigureCXProd" starttime=8/25/2013:00:00:00 latest=-24h date_wday=friday date_hour=15

| eventstats perc25(executiontime) as Q1Tempo, perc75(executiontime) as Q3Tempo 

| eval lim1=Q3Tempo+3*(Q3Tempo-Q1Tempo) 

| eval lim2=Q3Tempo+6*(Q3Tempo-Q1Tempo)

| eval lim3=Q3Tempo+10*(Q3Tempo-Q1Tempo) 

| eval     
Performance=case(executiontime&amp;gt;lim3,"High_Alert",executiontime&amp;gt;lim2,"Mid_Alert",executiontime&amp;gt;lim1,"Low_Alert",executiontime&amp;lt;lim1,"OK") 

| eval Low=if(executiontime&amp;gt;lim1 AND executiontime&amp;lt;lim2,1,0) 

| eval Mid=if(executiontime&amp;gt;lim2 AND executiontime&amp;lt;lim3,1,0) 

| eval High=if(executiontime&amp;gt;lim3,1,0) 

| eval OutQ=if(executiontime&amp;gt;lim1,1,0) 

| stats avg(OutQ) as AvgOut,avg(Low) as AvgLow, avg(Mid) as AvgMid,avg(High) as AvgHigh
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Sep 2013 21:39:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Different-Ranges-queries/m-p/57109#M753</guid>
      <dc:creator>TiagoMatos</dc:creator>
      <dc:date>2013-09-06T21:39:54Z</dc:date>
    </item>
  </channel>
</rss>

