<?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: Need help setting up the alerts in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Need-help-setting-up-the-alerts/m-p/104967#M1491</link>
    <description>&lt;P&gt;I did that now. There isn't much data in this environment. Will get back to you after I get few mails about how its working.&lt;/P&gt;</description>
    <pubDate>Mon, 29 Oct 2012 14:26:20 GMT</pubDate>
    <dc:creator>theouhuios</dc:creator>
    <dc:date>2012-10-29T14:26:20Z</dc:date>
    <item>
      <title>Need help setting up the alerts</title>
      <link>https://community.splunk.com/t5/Alerting/Need-help-setting-up-the-alerts/m-p/104962#M1486</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;I am trying to set up an alert for search and I am not sure why it isn't working. Here is the search &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="incident"| rename record.assignmentGroup as A , record.affectedCI as B | eval mybucket=case(date_hour&amp;lt;4,1,date_hour&amp;lt;8,2,date_hour&amp;lt;12,3,date_hour&amp;lt;16,4,date_hour&amp;lt;20,5,date_hour&amp;gt;0,6) | stats count as I by B, mybucket,date_mday,date_month,date_year , A, _time |delta I as D | eval D = abs(D) | eventstats avg(I) as xbar, avg(D) as mbar by B | eval threshold = xbar + (2.66*mbar) | eval threshold=coalesce(threshold,0)|table B A I threshold
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And the output will be like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    B         A     I   threshold
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;1   A0058A09    WG7100  1   1.00&lt;BR /&gt;
2   A0058A09    WG7100  1   1.00&lt;BR /&gt;
3   A0058A09    WG1675  1   1.00&lt;BR /&gt;
4   A0058A09    WG1675  1   1.00&lt;BR /&gt;
5   A0058A09    WG7100  1   1.00&lt;/P&gt;

&lt;P&gt;Now I need to set up an alert where I&amp;gt;threshold. Any suggestions on what would be the method to set an alert for this. &lt;/P&gt;

&lt;P&gt;Also is it possible to change the subject of alert to give the value of B and the threshold ? Like "Splunk Alert for $B$ with threshold as $threshold$". The subject will need to change according to the B which has crossed its threshold.&lt;/P&gt;

&lt;P&gt;Any help?&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;

&lt;P&gt;theou&lt;/P&gt;</description>
      <pubDate>Sun, 28 Oct 2012 19:33:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Need-help-setting-up-the-alerts/m-p/104962#M1486</guid>
      <dc:creator>theouhuios</dc:creator>
      <dc:date>2012-10-28T19:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: Need help setting up the alerts</title>
      <link>https://community.splunk.com/t5/Alerting/Need-help-setting-up-the-alerts/m-p/104963#M1487</link>
      <description>&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2012 13:17:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Need-help-setting-up-the-alerts/m-p/104963#M1487</guid>
      <dc:creator>theouhuios</dc:creator>
      <dc:date>2012-10-29T13:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need help setting up the alerts</title>
      <link>https://community.splunk.com/t5/Alerting/Need-help-setting-up-the-alerts/m-p/104964#M1488</link>
      <description>&lt;P&gt;You should be able to add this onto the end of your search (remove the table command) and create an alert in the UI.   &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;yoursearch&amp;gt; | where I &amp;gt; threshold     
&amp;lt;yoursearch&amp;gt; | search I &amp;gt; threshold
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is a simple example from our docs for setting up an alert given a threshold.  &lt;A href="http://docs.splunk.com/Documentation/Splunk/4.3.4/User/Alertusecases#Base_search_-_Refine_to_provide_better.2C_more_useful_results"&gt;http://docs.splunk.com/Documentation/Splunk/4.3.4/User/Alertusecases#Base_search_-_Refine_to_provide_better.2C_more_useful_results&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I don't think you can change the subject of the alerts currently but i'll check.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2012 13:30:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Need-help-setting-up-the-alerts/m-p/104964#M1488</guid>
      <dc:creator>sdaniels</dc:creator>
      <dc:date>2012-10-29T13:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need help setting up the alerts</title>
      <link>https://community.splunk.com/t5/Alerting/Need-help-setting-up-the-alerts/m-p/104965#M1489</link>
      <description>&lt;P&gt;Thanks @sdaniels. I did the same when I tried it before. But I wonder why it was sending me emails even when I was equal to the threshold. Under the alerts there are 2 options "Once per search" and "Once per result". I had it setup for result. Would that have been the reason on why it sent me emails even when they are same? I was also wondering if the data would be reason as I would be  "int" as 1,2 etc and threshold would be a "float" as 1.00,1.96 etc.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2012 14:06:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Need-help-setting-up-the-alerts/m-p/104965#M1489</guid>
      <dc:creator>theouhuios</dc:creator>
      <dc:date>2012-10-29T14:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: Need help setting up the alerts</title>
      <link>https://community.splunk.com/t5/Alerting/Need-help-setting-up-the-alerts/m-p/104966#M1490</link>
      <description>&lt;P&gt;I just tried float versus int and that seems to be fine on determining greater than.  What happens when you keep your search above with the table and you do 'If Custom condition is met' with 'search I &amp;gt; threshold'?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2012 14:15:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Need-help-setting-up-the-alerts/m-p/104966#M1490</guid>
      <dc:creator>sdaniels</dc:creator>
      <dc:date>2012-10-29T14:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need help setting up the alerts</title>
      <link>https://community.splunk.com/t5/Alerting/Need-help-setting-up-the-alerts/m-p/104967#M1491</link>
      <description>&lt;P&gt;I did that now. There isn't much data in this environment. Will get back to you after I get few mails about how its working.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2012 14:26:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Need-help-setting-up-the-alerts/m-p/104967#M1491</guid>
      <dc:creator>theouhuios</dc:creator>
      <dc:date>2012-10-29T14:26:20Z</dc:date>
    </item>
  </channel>
</rss>

