<?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 Email Alert Recipients from the Reports in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Custom-Email-Alert-Recipients-from-the-Reports/m-p/238932#M4464</link>
    <description>&lt;P&gt;Agree that helps. But I am stuck in a situation where the userid is not exactly same as email. Lets say:&lt;/P&gt;

&lt;P&gt;user Jdoe has 20 Failed Logins. The email id of this user could be &lt;A href="mailto:john.joe@domain.com"&gt;john.joe@domain.com&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Mar 2016 15:19:27 GMT</pubDate>
    <dc:creator>muralianup</dc:creator>
    <dc:date>2016-03-10T15:19:27Z</dc:date>
    <item>
      <title>Custom Email Alert Recipients from the Reports</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Email-Alert-Recipients-from-the-Reports/m-p/238930#M4462</link>
      <description>&lt;P&gt;Is it possible to send the alerts to the users who are in the reports ? I have a report sent via email which monitors failed logins when it hits a certain threshold. Now, I want to know if its possible to send this report to the user itself who've this failed logins.&lt;BR /&gt;
Eg:&lt;/P&gt;

&lt;P&gt;UserA --&amp;gt; 20 failed logins --&amp;gt; Send the report to User A&lt;BR /&gt;
UserB --&amp;gt;10 failed logins  --&amp;gt; Send the report to User B&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2016 16:56:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Email-Alert-Recipients-from-the-Reports/m-p/238930#M4462</guid>
      <dc:creator>muralianup</dc:creator>
      <dc:date>2016-03-09T16:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Email Alert Recipients from the Reports</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Email-Alert-Recipients-from-the-Reports/m-p/238931#M4463</link>
      <description>&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Alert/Emailnotification"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Alert/Emailnotification&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;See the section "&lt;STRONG&gt;Send email to different recipients based on search results&lt;/STRONG&gt;".&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2016 17:42:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Email-Alert-Recipients-from-the-Reports/m-p/238931#M4463</guid>
      <dc:creator>jstacey_intuit</dc:creator>
      <dc:date>2016-03-09T17:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Email Alert Recipients from the Reports</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Email-Alert-Recipients-from-the-Reports/m-p/238932#M4464</link>
      <description>&lt;P&gt;Agree that helps. But I am stuck in a situation where the userid is not exactly same as email. Lets say:&lt;/P&gt;

&lt;P&gt;user Jdoe has 20 Failed Logins. The email id of this user could be &lt;A href="mailto:john.joe@domain.com"&gt;john.joe@domain.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 15:19:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Email-Alert-Recipients-from-the-Reports/m-p/238932#M4464</guid>
      <dc:creator>muralianup</dc:creator>
      <dc:date>2016-03-10T15:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Email Alert Recipients from the Reports</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Email-Alert-Recipients-from-the-Reports/m-p/238933#M4465</link>
      <description>&lt;P&gt;This cannot be done with the standard alert capabilities but you can call &lt;CODE&gt;sendemail&lt;/CODE&gt; inside of the search itself:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Sendemail"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Sendemail&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Assuming you have passed your events through a lookup so that each event has a field called &lt;CODE&gt;email_address&lt;/CODE&gt;, it will look somewhat like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | outputcsv MySearchOutput.csv
    | stats values(email_address) AS emailToheader mvexpand emailToheader
    | map search="|inputcsv max=0 MySearchOutput.csv | where email_address="$emailToHeader$"
    | fields - email_address
    | sendemail
          sendresults=true inline=true
          from=\"somebody@somedomain.com\"
          to=\"$emailToHeader$\"
          subject=\"Some Subject\"
          message=\"Some Body\"
    | where Comment="Make sure no events remain and put the results back the way that they were so that Alert stuff works, too."
    | append [|inputcsv max=0 MySearchOutput.csv]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 13 Mar 2016 00:29:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Email-Alert-Recipients-from-the-Reports/m-p/238933#M4465</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-03-13T00:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Email Alert Recipients from the Reports</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Email-Alert-Recipients-from-the-Reports/m-p/238934#M4466</link>
      <description>&lt;P&gt;Problem is only the username is captured in the log and corresponding email id format is different. Username can be jdoe and email will be john.doe@ . Do you think there must be some script that can pull this info from the ldap or ad ?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2016 15:51:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Email-Alert-Recipients-from-the-Reports/m-p/238934#M4466</guid>
      <dc:creator>muralianup</dc:creator>
      <dc:date>2016-03-15T15:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Email Alert Recipients from the Reports</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Email-Alert-Recipients-from-the-Reports/m-p/238935#M4467</link>
      <description>&lt;P&gt;Yes.  You can either do a nightly LDAP for all users and dump to a lookup file OR do a scripted lookup to LDAP each user.  Either way, my original answer is the same: you just need to convert user to email first.&lt;/P&gt;</description>
      <pubDate>Sun, 20 Mar 2016 22:15:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Email-Alert-Recipients-from-the-Reports/m-p/238935#M4467</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-03-20T22:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Email Alert Recipients from the Reports</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Email-Alert-Recipients-from-the-Reports/m-p/238936#M4468</link>
      <description>&lt;P&gt;Understood. I was rather thinking if there's a way to do a real-time ldap check because the  number of users are very high so I do not know how feasible dumping a lookup from LDAP will be.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2016 09:57:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Email-Alert-Recipients-from-the-Reports/m-p/238936#M4468</guid>
      <dc:creator>muralianup</dc:creator>
      <dc:date>2016-03-21T09:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Email Alert Recipients from the Reports</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Email-Alert-Recipients-from-the-Reports/m-p/238937#M4469</link>
      <description>&lt;P&gt;Yes, this can be done but I have not done it so cannot speak to the details.  You are probably best off closing out this question by clicking "Answer" and the asking a new question about LDAP lookups.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2016 14:31:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Email-Alert-Recipients-from-the-Reports/m-p/238937#M4469</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-03-21T14:31:56Z</dc:date>
    </item>
  </channel>
</rss>

