<?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: Conditional standard deviations: How to create an alert that excludes specific outlier rows of one KPI from a StDev calculation that also must be included in a StDev where it’s not an outlier for other KPIs? in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Conditional-standard-deviations-How-to-create-an-alert-that/m-p/487121#M8625</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;...
| stats stdev(Volume) as VolumeStd, stdev(eval(case(VolumeOutlier=0, Volume))) as VolumeStdDev by service
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;add &lt;CODE&gt;eval&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Apr 2020 23:05:09 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-04-24T23:05:09Z</dc:date>
    <item>
      <title>Conditional standard deviations: How to create an alert that excludes specific outlier rows of one KPI from a StDev calculation that also must be included in a StDev where it’s not an outlier for other KPIs?</title>
      <link>https://community.splunk.com/t5/Alerting/Conditional-standard-deviations-How-to-create-an-alert-that/m-p/487120#M8624</link>
      <description>&lt;P&gt;I need to create an alert that's more intelligent and based on a baseline. I have a search that produces the following dataset in run anywhere spl:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;|makeresults 1 | eval service="placeOrder", week=1, Volume=100, VolumeMed=100, VolumeLowerBound=28.75, VolumeIQR=47.5, VolumeUpperBound=175.25, VolumeOutlier=0, SuccessRate=80, FailureRate=20, RespTimeMed=500
| append [|makeresults 1 | eval service="placeOrder", week=2, Volume=95, VolumeMed=100, VolumeLowerBound=28.75, VolumeIQR=47.5, VolumeUpperBound=175.25, VolumeOutlier=0, SuccessRate=10, FailureRate=90, RespTimeMed=11400]
| append [|makeresults 1 | eval service="placeOrder", week=3, Volume=105, VolumeMed=100, VolumeLowerBound=28.75, VolumeIQR=47.5, VolumeUpperBound=175.25, VolumeOutlier=0, SuccessRate=85, FailureRate=15, RespTimeMed=450]
| append [|makeresults 1 | eval service="placeOrder", week=4, Volume=100, VolumeMed=100, VolumeLowerBound=28.75, VolumeIQR=47.5, VolumeUpperBound=175.25, VolumeOutlier=0, SuccessRate=75, FailureRate=25, RespTimeMed=550]
| append [|makeresults 1 | eval service="placeOrder", week=5, Volume=15, VolumeMed=100, VolumeLowerBound=28.75, VolumeIQR=47.5, VolumeUpperBound=175.25, VolumeOutlier=1, SuccessRate=75, FailureRate=25, RespTimeMed=450]
| fields service, week, Volume, VolumeMed, VolumeLowerBound, VolumeIQR, VolumeUpperBound, VolumeOutlier, SuccessRate, FailureRate, RespTimeMed
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;There are 5 total KPIs: Volume, SuccessRate, WarningRate, FailureRate, ResponseTime. I want to remove outliers prior to calculating the standard deviation but the problem is a single row may only contain an outlier in one of these KPIs, so the row must stay. In this case, each KPI outlier is on a different row, so i need the StDev of Volume to exclude week 5, and I need the StDev of SuccessRate to exclude week 2, but week 2 must still be included for the Volume StDev because it is not a Volume outlier, only a SuccessRate outlier.&lt;/P&gt;
&lt;P&gt;I tried adding this to the end of the search:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;| stats stdev(Volume), stdev(case(VolumeOutlier=0, Volume)) as VolumeStdDev by service
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But, this is the result:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;service                stdev(Volume)                VolumeStdDev
placeOrder             38.1772         
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The column where I try to limit what rows it uses is blank. VolumeStdDev should be 4.0824.&lt;/P&gt;
&lt;P&gt;How can I achieve excluding certain outlier rows of one KPI from a StDev calculation but whose row must remain to be included in StDev where it is not an outlier for those other KPIs?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 21:49:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Conditional-standard-deviations-How-to-create-an-alert-that/m-p/487120#M8624</guid>
      <dc:creator>weidertc</dc:creator>
      <dc:date>2020-06-09T21:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional standard deviations: How to create an alert that excludes specific outlier rows of one KPI from a StDev calculation that also must be included in a StDev where it’s not an outlier for other KPIs?</title>
      <link>https://community.splunk.com/t5/Alerting/Conditional-standard-deviations-How-to-create-an-alert-that/m-p/487121#M8625</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;...
| stats stdev(Volume) as VolumeStd, stdev(eval(case(VolumeOutlier=0, Volume))) as VolumeStdDev by service
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;add &lt;CODE&gt;eval&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 23:05:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Conditional-standard-deviations-How-to-create-an-alert-that/m-p/487121#M8625</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-24T23:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional standard deviations: How to create an alert that excludes specific outlier rows of one KPI from a StDev calculation that also must be included in a StDev where it’s not an outlier for other KPIs?</title>
      <link>https://community.splunk.com/t5/Alerting/Conditional-standard-deviations-How-to-create-an-alert-that/m-p/487122#M8626</link>
      <description>&lt;P&gt;ah, I forgot the eval.  Damn.  The hour I wasted on this.  Thanks!  This worked.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 12:53:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Conditional-standard-deviations-How-to-create-an-alert-that/m-p/487122#M8626</guid>
      <dc:creator>weidertc</dc:creator>
      <dc:date>2020-04-27T12:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional standard deviations: How to create an alert that excludes specific outlier rows of one KPI from a StDev calculation that also must be included in a StDev where it’s not an outlier for other KPIs?</title>
      <link>https://community.splunk.com/t5/Alerting/Conditional-standard-deviations-How-to-create-an-alert-that/m-p/487123#M8627</link>
      <description>&lt;P&gt;It's nice to be able to ask a community like this.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 13:29:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Conditional-standard-deviations-How-to-create-an-alert-that/m-p/487123#M8627</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-27T13:29:32Z</dc:date>
    </item>
  </channel>
</rss>

