<?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: Why does the trigger condition for my alert never work? in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Why-does-the-trigger-condition-for-my-alert-never-work/m-p/284003#M5243</link>
    <description>&lt;P&gt;Hi @splunkrocks2014,&lt;BR /&gt;
What software version are you using?&lt;/P&gt;

&lt;P&gt;What kind of alert did you create (real-time/scheduled)?&lt;/P&gt;

&lt;P&gt;This is more of experimental question, but could you possibly test the alert without the "table" command at the end? If you leave "table" out but use your original condition for events &amp;gt; 0, does the alert trigger as expected?&lt;/P&gt;</description>
    <pubDate>Wed, 06 Apr 2016 00:15:09 GMT</pubDate>
    <dc:creator>frobinson_splun</dc:creator>
    <dc:date>2016-04-06T00:15:09Z</dc:date>
    <item>
      <title>Why does the trigger condition for my alert never work?</title>
      <link>https://community.splunk.com/t5/Alerting/Why-does-the-trigger-condition-for-my-alert-never-work/m-p/284002#M5242</link>
      <description>&lt;P&gt;Hi.  &lt;/P&gt;

&lt;P&gt;I created an alert and tried to trigger a python script to capture the parameters if the alert condition is set as "if number of events" "is greater than" "0".  However, the trigger condition never works until I set it as "Always".  I have tried all different options to include custom set as "search count&amp;gt;0", and none of them work, although there were results from the alert.  Any clues?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=xyz sourcetype=xyz:abc c_host=myhostname | table c_ip cs_path
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;start time: -5m&lt;BR /&gt;
finish time: now&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 22:16:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Why-does-the-trigger-condition-for-my-alert-never-work/m-p/284002#M5242</guid>
      <dc:creator>splunkrocks2014</dc:creator>
      <dc:date>2016-04-05T22:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Why does the trigger condition for my alert never work?</title>
      <link>https://community.splunk.com/t5/Alerting/Why-does-the-trigger-condition-for-my-alert-never-work/m-p/284003#M5243</link>
      <description>&lt;P&gt;Hi @splunkrocks2014,&lt;BR /&gt;
What software version are you using?&lt;/P&gt;

&lt;P&gt;What kind of alert did you create (real-time/scheduled)?&lt;/P&gt;

&lt;P&gt;This is more of experimental question, but could you possibly test the alert without the "table" command at the end? If you leave "table" out but use your original condition for events &amp;gt; 0, does the alert trigger as expected?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 00:15:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Why-does-the-trigger-condition-for-my-alert-never-work/m-p/284003#M5243</guid>
      <dc:creator>frobinson_splun</dc:creator>
      <dc:date>2016-04-06T00:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Why does the trigger condition for my alert never work?</title>
      <link>https://community.splunk.com/t5/Alerting/Why-does-the-trigger-condition-for-my-alert-never-work/m-p/284004#M5244</link>
      <description>&lt;P&gt;It works by removed "table" command.  That means the condition doesn't support "table" command?&lt;/P&gt;

&lt;P&gt;Splunk Enterprise: 6.3.2&lt;BR /&gt;
Alert: scheduled every 5 mins&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 14:06:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Why-does-the-trigger-condition-for-my-alert-never-work/m-p/284004#M5244</guid>
      <dc:creator>splunkrocks2014</dc:creator>
      <dc:date>2016-04-06T14:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Why does the trigger condition for my alert never work?</title>
      <link>https://community.splunk.com/t5/Alerting/Why-does-the-trigger-condition-for-my-alert-never-work/m-p/284005#M5245</link>
      <description>&lt;P&gt;Hi Splunkrocks2014,&lt;/P&gt;

&lt;P&gt;The custom condition is typically set using the search command (see example: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1/Alert/Alertexamples"&gt;http://docs.splunk.com/Documentation/Splunk/6.1/Alert/Alertexamples&lt;/A&gt;)&lt;/P&gt;

&lt;P&gt;I think you may need to change your base search a bit. If I understand your question correctly, you may be looking for something like this as your base search..&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=xyz sourcetype=xyz:abc c_host=myhostname | stats count by c_ip, cs_path
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;From here, you can create your alert, and set your custom condition to be something like "search count &amp;gt; 0", or whatever number you like.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2016 06:08:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Why-does-the-trigger-condition-for-my-alert-never-work/m-p/284005#M5245</guid>
      <dc:creator>jluo_splunk</dc:creator>
      <dc:date>2016-04-07T06:08:30Z</dc:date>
    </item>
  </channel>
</rss>

