<?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 set up alerts with multiple fields with different thresholds in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467666#M131632</link>
    <description>&lt;P&gt;example in this case would be trigger an alert when avg(time) for A &amp;gt; 2 and count &amp;gt;3 then evaluate avg(time) for B &amp;gt;5 and count &amp;gt; 10. If all the conditions meets then only trigger an alert.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Oct 2019 20:43:30 GMT</pubDate>
    <dc:creator>abhishekbhasin</dc:creator>
    <dc:date>2019-10-29T20:43:30Z</dc:date>
    <item>
      <title>How to set up alerts with multiple fields with different thresholds</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467662#M131628</link>
      <description>&lt;P&gt;Trying to setup up an alert with multiple fields extracted through Field.&lt;/P&gt;

&lt;P&gt;For example A,B, C etc and each having a different threshold for avg(time) and count. &lt;/P&gt;

&lt;P&gt;Below is an example:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=XXXX sourcetype="XXX" | where Field in("A") | stats count avg(time) as A | where A&amp;gt;2 and count&amp;gt;3| where Field in("B") |stats count avg(time) as B | where B&amp;gt;5 and count&amp;gt;10&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 18:12:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467662#M131628</guid>
      <dc:creator>abhishekbhasin</dc:creator>
      <dc:date>2019-10-29T18:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up alerts with multiple fields with different thresholds</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467663#M131629</link>
      <description>&lt;P&gt;Hi there - &lt;/P&gt;

&lt;P&gt;Currently we don't support multiple fields in separate the same condition (e.g. you can do A&amp;gt;0 and A&amp;lt;10 but not A&amp;gt;0 and B&amp;gt;0).&lt;/P&gt;

&lt;P&gt;The work around is to create a new single column that represents the underlying logic of the column combination e.g.&lt;/P&gt;

&lt;P&gt;From original &lt;BR /&gt;
index=XXXX sourcetype="XXX" &lt;BR /&gt;
| where Field in("A")&lt;BR /&gt;
| stats count avg(time) as A &lt;BR /&gt;
| where A&amp;gt;2 and count&amp;gt;3 --condition1&lt;BR /&gt;
| where Field in("B") &lt;BR /&gt;
|stats count avg(time) as B &lt;BR /&gt;
| where B&amp;gt;5 and count&amp;gt;10 --condition2&lt;/P&gt;

&lt;P&gt;Change base search to something along the lines of:&lt;BR /&gt;
index=XXXX sourcetype="XXX"&lt;BR /&gt;
| eval a_or_b=case(Field in("A"), "A", Field in("B"), "B")&lt;BR /&gt;
| stats count() as myCount, avg(time) as avg_time by a_or_b&lt;BR /&gt;
| eval alert_a=case(a_or_b="A" AND  avg_time&amp;gt;2 AND count&amp;gt;3, 1)&lt;BR /&gt;
| eval alert_b=case(a_or_b="B" AND  avg_time&amp;gt;5 AND count&amp;gt;10, 1)&lt;/P&gt;

&lt;P&gt;In the UI....&lt;BR /&gt;
Condition 1: alert_a = 1 --&amp;gt; actions&lt;BR /&gt;
Condition 2: alert_b = 1--&amp;gt; actions&lt;/P&gt;

&lt;P&gt;Also please feel free to email &lt;A href="mailto:scs-alerts@splunk.com" target="_blank"&gt;scs-alerts@splunk.com&lt;/A&gt; if you run into any additional trouble!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:46:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467663#M131629</guid>
      <dc:creator>mluna_splunk</dc:creator>
      <dc:date>2020-09-30T02:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up alerts with multiple fields with different thresholds</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467664#M131630</link>
      <description>&lt;P&gt;Can you write out some example data? I'm having a hard time coming up with a catch all answer for a few different cases I can think of that you might be talking about, and don't want to lead you down the wrong path!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 20:37:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467664#M131630</guid>
      <dc:creator>aberkow</dc:creator>
      <dc:date>2019-10-29T20:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up alerts with multiple fields with different thresholds</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467665#M131631</link>
      <description>&lt;P&gt;Have an answer pending post...&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 20:38:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467665#M131631</guid>
      <dc:creator>mluna_splunk</dc:creator>
      <dc:date>2019-10-29T20:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up alerts with multiple fields with different thresholds</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467666#M131632</link>
      <description>&lt;P&gt;example in this case would be trigger an alert when avg(time) for A &amp;gt; 2 and count &amp;gt;3 then evaluate avg(time) for B &amp;gt;5 and count &amp;gt; 10. If all the conditions meets then only trigger an alert.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 20:43:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467666#M131632</guid>
      <dc:creator>abhishekbhasin</dc:creator>
      <dc:date>2019-10-29T20:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up alerts with multiple fields with different thresholds</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467667#M131633</link>
      <description>&lt;P&gt;You cannot do it in the alert dialog so do it just like you are in SPL at the end and set your alert trigger to &lt;CODE&gt;number of results&lt;/CODE&gt; and &lt;CODE&gt;is greater than zero&lt;/CODE&gt;.  This is more clear to the analysts anyway.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 20:50:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467667#M131633</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-10-29T20:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up alerts with multiple fields with different thresholds</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467668#M131634</link>
      <description>&lt;P&gt;Splunk Investigate Alerts don't support Number of Results &amp;gt; foo&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 20:51:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467668#M131634</guid>
      <dc:creator>mluna_splunk</dc:creator>
      <dc:date>2019-10-29T20:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up alerts with multiple fields with different thresholds</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467669#M131635</link>
      <description>&lt;P&gt;Able to get the data with above mentioned query but having trouble building alert since it's a custom alert.&lt;/P&gt;

&lt;P&gt;Could you please send syntax for this&lt;BR /&gt;
Condition 1: alert_a = 1 --&amp;gt; actions&lt;BR /&gt;
Condition 2: alert_b = 1--&amp;gt; actions&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:44:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467669#M131635</guid>
      <dc:creator>abhishekbhasin</dc:creator>
      <dc:date>2020-09-30T02:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up alerts with multiple fields with different thresholds</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467670#M131636</link>
      <description>&lt;P&gt;Able to get the data with above mentioned query but having trouble building alert since it's a custom alert.&lt;/P&gt;

&lt;P&gt;Could you please send syntax for this&lt;BR /&gt;
Condition 1: alert_a = 1 --&amp;gt; actions&lt;BR /&gt;
Condition 2: alert_b = 1--&amp;gt; actions&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:48:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467670#M131636</guid>
      <dc:creator>abhishekbhasin</dc:creator>
      <dc:date>2020-09-30T02:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up alerts with multiple fields with different thresholds</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467671#M131637</link>
      <description>&lt;P&gt;Hi there - you don't need syntax for that. You simply designate the numeric field in the Splunk Investigate triggers &amp;amp; alerts UI and whether &amp;lt;&amp;gt;= a particular value. &lt;/P&gt;

&lt;P&gt;See &lt;A href="https://docs.splunk.com/Documentation/SplunkInvestigate/Current/Use/Trigger"&gt;https://docs.splunk.com/Documentation/SplunkInvestigate/Current/Use/Trigger&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2019 18:16:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467671#M131637</guid>
      <dc:creator>mluna_splunk</dc:creator>
      <dc:date>2019-10-31T18:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up alerts with multiple fields with different thresholds</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467672#M131638</link>
      <description>&lt;P&gt;Happy to help further w your specific case if you email &lt;A href="mailto:scs-alerts@splunk.com"&gt;scs-alerts@splunk.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2019 18:16:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467672#M131638</guid>
      <dc:creator>mluna_splunk</dc:creator>
      <dc:date>2019-10-31T18:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up alerts with multiple fields with different thresholds</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467673#M131639</link>
      <description>&lt;P&gt;WHAT????  Are you &lt;EM&gt;sure&lt;/EM&gt;?  That is &lt;EM&gt;CRAZY&lt;/EM&gt;!&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2019 21:23:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467673#M131639</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-10-31T21:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up alerts with multiple fields with different thresholds</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467674#M131640</link>
      <description>&lt;P&gt;Yep. You'd append a | stats count() to your base search to approx that behavior. For now. Welcome any feedback -- &lt;A href="mailto:scs-alerts@splunk.com"&gt;scs-alerts@splunk.com&lt;/A&gt; and encourage you to sign up for the Investigate trial!&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2019 16:24:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-alerts-with-multiple-fields-with-different/m-p/467674#M131640</guid>
      <dc:creator>mluna_splunk</dc:creator>
      <dc:date>2019-11-01T16:24:31Z</dc:date>
    </item>
  </channel>
</rss>

