<?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: Custom Condition Question for Alert in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38910#M442</link>
    <description>&lt;P&gt;As written, your search will set icount equal to the number of events returned.&lt;BR /&gt;
The search "index=main source=winEventlog |stats dc(source) as icount" will result in icount being set to 1.&lt;/P&gt;

&lt;P&gt;Try skipping the dashboard. &lt;BR /&gt;
In the search bar add the search, "index=main source=winEventlog |stats dc(source) as icount".&lt;BR /&gt;
Execute the search.&lt;BR /&gt;
Click "Save As".&lt;BR /&gt;
Choose Alert.&lt;BR /&gt;
You can choose to schedule the alert to execute on a regular interval.&lt;BR /&gt;
Then,&lt;BR /&gt;
Edit Trigger Alert When to Custom. Add your condition, "search icount&amp;gt;999999".&lt;BR /&gt;
Under Trigger Actions, choose Add Action.  Select Send Email.&lt;BR /&gt;
You can choose to include a pdf, csv, link, etc.&lt;/P&gt;</description>
    <pubDate>Mon, 24 Apr 2017 21:11:30 GMT</pubDate>
    <dc:creator>eelisio2</dc:creator>
    <dc:date>2017-04-24T21:11:30Z</dc:date>
    <item>
      <title>Custom Condition Question for Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38900#M432</link>
      <description>&lt;P&gt;This is the search I am running.  I use this search in a dashboard with a single value, color coded:&lt;/P&gt;

&lt;P&gt;index=&lt;EM&gt;internal source=*metrics.log group=per_index_thruput series!=&lt;/EM&gt;* | eval totalGB = (kb/1024)/1024 | timechart span=1d sum(totalGB) | rangemap field=sum(totalGB) low=0-13 elevated=13-16 severe=16-9999 default=None&lt;/P&gt;

&lt;P&gt;I want an alert to fire if sum(totalGB)&amp;gt; 8.  This is what I am trying to use in the "if custom condition is met", but I cannot get the alert to fire:&lt;/P&gt;

&lt;P&gt;search sum(totalGB) | where sum(totalGB) &amp;gt; 8&lt;/P&gt;

&lt;P&gt;Any help is greatly appreciated.  Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 10:14:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38900#M432</guid>
      <dc:creator>aferone</dc:creator>
      <dc:date>2020-09-28T10:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Condition Question for Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38901#M433</link>
      <description>&lt;P&gt;I would modify the search slightly.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source="metrics.log" group=per_index_thruput series!=_ | eval totalGB = (kb/1024)/1024 | timechart span=1d sum(totalGB) as SUMTOTALGB | rangemap field=SUMTOTALGB low=0-13 elevated=13-16 severe=16-9999 default=None
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And use the following in the Alert custom criterion:&lt;/P&gt;

&lt;P&gt;search SUMTOTALGB &amp;gt; 8&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2011 21:18:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38901#M433</guid>
      <dc:creator>eelisio2</dc:creator>
      <dc:date>2011-12-21T21:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Condition Question for Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38902#M434</link>
      <description>&lt;P&gt;Perfect!  Thank you very much!&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2011 21:28:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38902#M434</guid>
      <dc:creator>aferone</dc:creator>
      <dc:date>2011-12-21T21:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Condition Question for Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38903#M435</link>
      <description>&lt;P&gt;Super, it works great!&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2012 15:21:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38903#M435</guid>
      <dc:creator>tpaulsen</dc:creator>
      <dc:date>2012-02-03T15:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Condition Question for Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38904#M436</link>
      <description>&lt;P&gt;did not work for me&lt;BR /&gt;
i have &lt;BR /&gt;
index="abc" &lt;BR /&gt;
|dedup ENV&lt;BR /&gt;
| eval envt=ENV&lt;/P&gt;

&lt;P&gt;and condition as&lt;BR /&gt;
search envt=PROD&lt;/P&gt;

&lt;P&gt;Splunk sending emails even if condition does not match&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 00:29:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38904#M436</guid>
      <dc:creator>Saurabhsood</dc:creator>
      <dc:date>2017-04-14T00:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Condition Question for Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38905#M437</link>
      <description>&lt;P&gt;Saurabhsood:&lt;BR /&gt;
I assume that ENV is a field.  And the values of the field ENV include "PROD".  As written, your search will return the full event that corresponds to the first new value of ENV that it sees.  Given the following events:&lt;/P&gt;

&lt;P&gt;4/13/2017  PROD  The first event&lt;BR /&gt;
4/13/2017  DEV     The second event&lt;BR /&gt;
4/13/2017  PROD  The third event&lt;BR /&gt;
4/13/2017  ZZZ      The fourth event&lt;BR /&gt;
4/13/2017  DEV     The fifth event&lt;/P&gt;

&lt;P&gt;Your search would return the first, second and fourth events.  The ENV field would have 3 unique values.&lt;BR /&gt;
i suggest adding a table command to the end of your search to validate that you are getting the results you expect.&lt;BR /&gt;
index="abc"&lt;BR /&gt;
|dedup ENV&lt;BR /&gt;
| eval envt=ENV&lt;BR /&gt;
| table ENV&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 01:30:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38905#M437</guid>
      <dc:creator>eelisio2</dc:creator>
      <dc:date>2017-04-14T01:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Condition Question for Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38906#M438</link>
      <description>&lt;P&gt;I think i already tried what u suggested but tried one more time but no success. Every time i am getting mail from splunk.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 02:43:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38906#M438</guid>
      <dc:creator>Saurabhsood</dc:creator>
      <dc:date>2017-04-14T02:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Condition Question for Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38907#M439</link>
      <description>&lt;P&gt;Can you test on a small set of events? (Maybe 5-10 events)  Can you submit the sample data, the search and the results of your search?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 03:46:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38907#M439</guid>
      <dc:creator>eelisio2</dc:creator>
      <dc:date>2017-04-14T03:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Condition Question for Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38908#M440</link>
      <description>&lt;P&gt;My search was:&lt;BR /&gt;
index="abc"&lt;BR /&gt;
|dedup ENV&lt;BR /&gt;
| eval envt=ENV&lt;BR /&gt;
| table envt&lt;BR /&gt;
Here ENV is a field with only value as "DEV". So ultimately "| table envt" will have only one record as "DEV"&lt;BR /&gt;
And then in custom condition i tried "search envt=Prod"&lt;BR /&gt;
i am expecting splunk to stop sending alert for this condition. But it always send me email as an alert.&lt;BR /&gt;
i think i have tried 100 combinations till now &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 17:27:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38908#M440</guid>
      <dc:creator>Saurabhsood</dc:creator>
      <dc:date>2017-04-14T17:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Condition Question for Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38909#M441</link>
      <description>&lt;P&gt;I have a dashboard with 1 report. I want to schedule this dashboard with custom conditions.&lt;BR /&gt;
After scheduling the pdf from dashboard, I went to "setting"&amp;gt;&amp;gt; "searches,report and alerts" to make custom alert for this dashboard.&lt;BR /&gt;
I opened _scheduleview_Mydashboard. and in &lt;STRONG&gt;search&lt;/STRONG&gt;, i added my below code&lt;BR /&gt;
"index=main source=winEventlog |stats count(source) as icount"&lt;BR /&gt;
And then in custom condition for email to trigger, i added "custom condition search" as "search icount&amp;gt;999999"&lt;BR /&gt;
I am expecting that email will not trigger as icount will be less than my custom condition, but email is getting triggered for dashboard with attached PDF.&lt;/P&gt;

&lt;P&gt;Can someone suggest, what's wroung i am doing here in my steps&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:48:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38909#M441</guid>
      <dc:creator>Saurabhsood</dc:creator>
      <dc:date>2020-09-29T13:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Condition Question for Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38910#M442</link>
      <description>&lt;P&gt;As written, your search will set icount equal to the number of events returned.&lt;BR /&gt;
The search "index=main source=winEventlog |stats dc(source) as icount" will result in icount being set to 1.&lt;/P&gt;

&lt;P&gt;Try skipping the dashboard. &lt;BR /&gt;
In the search bar add the search, "index=main source=winEventlog |stats dc(source) as icount".&lt;BR /&gt;
Execute the search.&lt;BR /&gt;
Click "Save As".&lt;BR /&gt;
Choose Alert.&lt;BR /&gt;
You can choose to schedule the alert to execute on a regular interval.&lt;BR /&gt;
Then,&lt;BR /&gt;
Edit Trigger Alert When to Custom. Add your condition, "search icount&amp;gt;999999".&lt;BR /&gt;
Under Trigger Actions, choose Add Action.  Select Send Email.&lt;BR /&gt;
You can choose to include a pdf, csv, link, etc.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 21:11:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38910#M442</guid>
      <dc:creator>eelisio2</dc:creator>
      <dc:date>2017-04-24T21:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Condition Question for Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38911#M443</link>
      <description>&lt;P&gt;thanks eelisio, I know what you are trying to explain. Here I have 1 report in my dashboard as an example. But In real scenario I have more reports in dashboard which I want to schedule based on custom conditions. &lt;BR /&gt;
Problem is that splunk is not testing for custom conditions and sending emails based on schedule.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2017 00:30:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38911#M443</guid>
      <dc:creator>Saurabhsood</dc:creator>
      <dc:date>2017-04-25T00:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Condition Question for Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38912#M444</link>
      <description>&lt;P&gt;thanks eelisio, I know what you are trying to explain. Here I have 1 report in my dashboard as an example. But In real scenario I have more reports in dashboard which I want to schedule based on custom conditions. &lt;BR /&gt;
Problem is that splunk is not testing for custom conditions and sending emails based on schedule.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2017 00:31:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38912#M444</guid>
      <dc:creator>Saurabhsood</dc:creator>
      <dc:date>2017-04-25T00:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Condition Question for Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38913#M445</link>
      <description>&lt;P&gt;Sounds like maybe the search condition in the alert is syntactically wrong? Try adding a 'where' or 'search' filter to the base search of the alert to validate if that at least works.&lt;/P&gt;

&lt;P&gt;Essentially what I'm saying is that it sounds like @eelisio2's suggestions all are appropriate and accurate but there might be a subtle detail in your implementation that we're overlooking. Perhaps adding screen shots to your post would help see if there's simply a misunderstanding.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2017 12:45:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38913#M445</guid>
      <dc:creator>sloshburch</dc:creator>
      <dc:date>2017-04-25T12:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Condition Question for Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38914#M446</link>
      <description>&lt;P&gt;It sounds like you create more than 1 search and add each to a dashboard as an inline search (not save separately as a Report).  Then, you schedule the dashboard to deliver a PDF.  Your goal is to have the PDF delivered (or not) based on the result of 1 of the searches in the dashboard.&lt;/P&gt;

&lt;P&gt;You edited the &lt;EM&gt;ScheduledView&lt;/EM&gt;_Mydashboard artifact in "Searches, reports, and alerts".  Am I correct in understanding that you edit the Search at the top of the form?  You replace " | noop" with the first inline search from your dashboard or another search entirely?&lt;BR /&gt;
And then you edit the Alert Condition to be based on a field from your search.&lt;/P&gt;

&lt;P&gt;I have tested this scenario and it works with the Alert Action being "List in Triggered Alerts".  I don't have an email server set up.  Please try it with List in Triggered Alerts enabled and Send Email not enabled.  You can check for the alert under Activity=&amp;gt;Triggered Alerts&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2017 14:25:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38914#M446</guid>
      <dc:creator>eelisio2</dc:creator>
      <dc:date>2017-04-25T14:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Condition Question for Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38915#M447</link>
      <description>&lt;P&gt;Thanks eelisio for your response.&lt;BR /&gt;
"List in Triggered Alerts" is  working fine. I just checked. But send email is not working. I am expecting that splunk is sending email before checking for custom condition. not sure though.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2017 19:03:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38915#M447</guid>
      <dc:creator>Saurabhsood</dc:creator>
      <dc:date>2017-04-25T19:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Condition Question for Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38916#M448</link>
      <description>&lt;P&gt;Sanity check: Is Splunk able to send any emails? The &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Sendemail"&gt;sendemail&lt;/A&gt; command can be used to validate as well.&lt;/P&gt;

&lt;P&gt;Apologies if you already answered this but it does seem peculiar if the alert shows up in the Triggered Alerts but your emails aren't sending. This should clarify if the issue is the search or the hosts mail configuration.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2017 12:51:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38916#M448</guid>
      <dc:creator>sloshburch</dc:creator>
      <dc:date>2017-04-26T12:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Condition Question for Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38917#M449</link>
      <description>&lt;P&gt;Your server email settings may not be set up yet. All of that has to be in place before you can email reports/notifications and alerts. &lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Alert/Emailnotification"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Alert/Emailnotification&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 18:04:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Condition-Question-for-Alert/m-p/38917#M449</guid>
      <dc:creator>ryhluc01</dc:creator>
      <dc:date>2018-12-19T18:04:08Z</dc:date>
    </item>
  </channel>
</rss>

