<?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: Alert Sending Email based on a if condition in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60714#M1330</link>
    <description>&lt;P&gt;I have not personaly done this, but an other has on our system.  I would expect that sendmail [on a unix system] must be accepting request, well at leat on 127.0.0.1&lt;/P&gt;</description>
    <pubDate>Tue, 29 May 2012 13:02:07 GMT</pubDate>
    <dc:creator>fk319</dc:creator>
    <dc:date>2012-05-29T13:02:07Z</dc:date>
    <item>
      <title>Alert Sending Email based on a if condition</title>
      <link>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60708#M1324</link>
      <description>&lt;P&gt;I need to send an Email based on a if condition. Something like "if (value &amp;gt; 10) send an email". But I am not able to figure out how to do this. &lt;/P&gt;

&lt;P&gt;I am trying this with eval. But this only assigns the value to a variable(LoginQuality).&lt;/P&gt;

&lt;P&gt;"eval LoginQuality= if (AverageLoginTime &amp;gt;10, "More", "Less")".&lt;/P&gt;

&lt;P&gt;I need to make change/modify this statement to send an email depending on the condition.&lt;/P&gt;

&lt;P&gt;Can someone help me with this?&lt;/P&gt;</description>
      <pubDate>Fri, 25 May 2012 12:02:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60708#M1324</guid>
      <dc:creator>hiteshkanchan</dc:creator>
      <dc:date>2012-05-25T12:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: Alert Sending Email based on a if condition</title>
      <link>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60709#M1325</link>
      <description>&lt;P&gt;Under Manager/Searches and Reports you can schedule your e-mails.  This is a feature that veries quite a bit between version.  The later versions have better control over this.&lt;/P&gt;</description>
      <pubDate>Fri, 25 May 2012 12:55:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60709#M1325</guid>
      <dc:creator>fk319</dc:creator>
      <dc:date>2012-05-25T12:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Alert Sending Email based on a if condition</title>
      <link>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60710#M1326</link>
      <description>&lt;P&gt;I want to do this either from the search command or from a python script.&lt;/P&gt;

&lt;P&gt;From the search query/command, I get the AverageLoginTime value and based on this value I need to send the mail.&lt;/P&gt;

&lt;P&gt;So I am looking for some command like "if (AvearageLoginTime &amp;gt; 10) send an email"&lt;/P&gt;</description>
      <pubDate>Sun, 27 May 2012 18:58:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60710#M1326</guid>
      <dc:creator>hiteshkanchan</dc:creator>
      <dc:date>2012-05-27T18:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: Alert Sending Email based on a if condition</title>
      <link>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60711#M1327</link>
      <description>&lt;P&gt;If sending mail based on condition like "if (AvearageLoginTime &amp;gt; 10) send an email" is not possible, then I tried using Manager/Searches and Reports. &lt;BR /&gt;
But it does not seem to send any mails. Any idea if I need to do any configuration.&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2012 11:18:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60711#M1327</guid>
      <dc:creator>hiteshkanchan</dc:creator>
      <dc:date>2012-05-28T11:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Alert Sending Email based on a if condition</title>
      <link>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60712#M1328</link>
      <description>&lt;P&gt;there is a sendmail command,&lt;BR /&gt;
| eval send = if(AverageLoginTime&amp;gt;10,true,false)&lt;BR /&gt;
| search send=true&lt;BR /&gt;
| sendmail {arg list}&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/4.3.2/SearchReference/Sendemail"&gt;http://docs.splunk.com/Documentation/Splunk/4.3.2/SearchReference/Sendemail&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2012 11:43:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60712#M1328</guid>
      <dc:creator>fk319</dc:creator>
      <dc:date>2012-05-29T11:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Alert Sending Email based on a if condition</title>
      <link>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60713#M1329</link>
      <description>&lt;P&gt;Yes right, I am doing the same thing and getting some error like&lt;BR /&gt;
command="sendemail", [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond while sending mail to: "&lt;A href="mailto:username@mail.com"&gt;username@mail.com&lt;/A&gt;"&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2012 12:34:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60713#M1329</guid>
      <dc:creator>hiteshkanchan</dc:creator>
      <dc:date>2012-05-29T12:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: Alert Sending Email based on a if condition</title>
      <link>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60714#M1330</link>
      <description>&lt;P&gt;I have not personaly done this, but an other has on our system.  I would expect that sendmail [on a unix system] must be accepting request, well at leat on 127.0.0.1&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2012 13:02:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60714#M1330</guid>
      <dc:creator>fk319</dc:creator>
      <dc:date>2012-05-29T13:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Alert Sending Email based on a if condition</title>
      <link>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60715#M1331</link>
      <description>&lt;P&gt;If I understand your goal here, it's possible that an "advanced conditional alert" will suit your needs.  Check out &lt;A href="http://docs.splunk.com/Documentation/Splunk/4.2.3/User/SchedulingSavedSearches"&gt;http://docs.splunk.com/Documentation/Splunk/4.2.3/User/SchedulingSavedSearches&lt;/A&gt; and search for the section "Define an advanced conditional alert".  &lt;/P&gt;

&lt;P&gt;I think that using a conditional alert of the form &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search LoginQuality &amp;gt; 10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;should get you close to what you want...&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2012 14:01:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60715#M1331</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2012-05-29T14:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: Alert Sending Email based on a if condition</title>
      <link>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60716#M1332</link>
      <description>&lt;P&gt;Yes I am trying the same, but currently I am getting some error. "command="sendemail", [Errno 10061] No connection could be made because the target machine actively refused it while sending mail to: &lt;A href="mailto:hitesh@domain.com"&gt;hitesh@domain.com&lt;/A&gt;"".&lt;/P&gt;

&lt;P&gt;Looks like some configuration issue. Kindly let me know if anyone has resolved this issue&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2012 11:08:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60716#M1332</guid>
      <dc:creator>hiteshkanchan</dc:creator>
      <dc:date>2012-05-30T11:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Alert Sending Email based on a if condition</title>
      <link>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60717#M1333</link>
      <description>&lt;P&gt;I am trying this command --&amp;gt; sendemail to="&lt;A href="mailto:user@domain.com"&gt;user@domain.com&lt;/A&gt;" sendresults=true server="proxy.com:8080" and it gives the error like --&amp;gt; &lt;BR /&gt;
"command="sendemail", Connection unexpectedly closed while sending mail to: &lt;A href="mailto:user@domain.com"&gt;user@domain.com&lt;/A&gt;"&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2012 11:38:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60717#M1333</guid>
      <dc:creator>hiteshkanchan</dc:creator>
      <dc:date>2012-05-30T11:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Alert Sending Email based on a if condition</title>
      <link>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60718#M1334</link>
      <description>&lt;P&gt;You need to configure Splunk with a proper connection to a valid SMTP server.  I doubt that &lt;CODE&gt;proxy.com:8080&lt;/CODE&gt; is a valid SMTP server.  You need to make sure your basic SMTP connection is working before trying to move on to conditional alerts and stuff.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2012 04:11:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60718#M1334</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2012-06-08T04:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Alert Sending Email based on a if condition</title>
      <link>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60719#M1335</link>
      <description>&lt;P&gt;You can do this with a sub search. Check this out:&lt;/P&gt;

&lt;P&gt;index="_internal" group="per_source_thruput"   | search series!="_audit" | search series!="_internal"  | eval GB=(kb/1024)/1024 | stats sum(GB) as Hourly_Indexed_GB | eval test=if(Hourly_Indexed_GB &amp;gt; 20.3 ,[| search index="_internal" group="per_source_thruput" | search series!="_audit"   | search series!="_internal"  | eval GB=(kb/1024)/1024 | stats sum(GB) as GB | table GB  | sendemail to="&lt;A href="mailto:email@somewhere.com" target="_blank"&gt;email@somewhere.com&lt;/A&gt;" format=html subject=Splunk_License_warn server=Your_Mail_Server sendresults=true],"0" )&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:24:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60719#M1335</guid>
      <dc:creator>romantercero</dc:creator>
      <dc:date>2020-09-28T12:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: Alert Sending Email based on a if condition</title>
      <link>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60720#M1336</link>
      <description>&lt;P&gt;The gist of this is to include an if statement and place a sub search on the true or false clause of the if. The sub search uses the sendmail command to send you the results.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2012 18:01:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Alert-Sending-Email-based-on-a-if-condition/m-p/60720#M1336</guid>
      <dc:creator>romantercero</dc:creator>
      <dc:date>2012-09-07T18:01:19Z</dc:date>
    </item>
  </channel>
</rss>

