<?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: How to dynamically set the subject field in sendresults command app ? in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142987#M12484</link>
    <description>&lt;P&gt;FYI may be worth creating a new question for the next question around this, I only bumped this old question to advise it was now possible to use a dynamic subject!&lt;/P&gt;</description>
    <pubDate>Tue, 09 Oct 2018 20:43:03 GMT</pubDate>
    <dc:creator>gjanders</dc:creator>
    <dc:date>2018-10-09T20:43:03Z</dc:date>
    <item>
      <title>How to dynamically set the subject field in sendresults command app ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142969#M12466</link>
      <description>&lt;P&gt;Is there a way to set the subject field in the sendresults command app dynamically ?&lt;/P&gt;

&lt;P&gt;I'm looking for something like the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex | eval email_to="abc@splunk.com" |eval new_subject="Index is ".index | sendresults showemail=f subject=new_subject body="Body of the email" showemail=f
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What happens in the above scenario is that the subject of the email will be the string "new_subject" instead of its value. I need the subject to be "index is myindex".&lt;/P&gt;

&lt;P&gt;Any thoughts ??&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2015 20:14:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142969#M12466</guid>
      <dc:creator>nibinabr</dc:creator>
      <dc:date>2015-04-13T20:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically set the subject field in sendresults command app ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142970#M12467</link>
      <description>&lt;P&gt;Hi nibinabr&lt;BR /&gt;
Don't you want to use sendemail command ?&lt;BR /&gt;
If using sendmail command will satisfy you tell me &lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2015 22:31:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142970#M12467</guid>
      <dc:creator>chimell</dc:creator>
      <dc:date>2015-04-13T22:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically set the subject field in sendresults command app ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142971#M12468</link>
      <description>&lt;P&gt;Sure sendemail is an option. I was under the assumption that sendemail cannot take variables as their email subject etc and that was the reason I was trying out sendresults. How do I acheive this using sendemail ?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2015 03:51:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142971#M12468</guid>
      <dc:creator>nibinabr</dc:creator>
      <dc:date>2015-04-14T03:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically set the subject field in sendresults command app ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142972#M12469</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;

&lt;P&gt;Thank you for your interest in the sendresults command.&lt;/P&gt;

&lt;P&gt;At this time the sendresults command does not support what you are looking to do. As you probably saw, the command is expecting a string in the subject parameter and not the value as passed in from another field.&lt;/P&gt;

&lt;P&gt;We are looking to update the command soon and this would be a great new feature to add into the next release.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2015 02:11:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142972#M12469</guid>
      <dc:creator>mockd</dc:creator>
      <dc:date>2015-04-15T02:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically set the subject field in sendresults command app ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142973#M12470</link>
      <description>&lt;P&gt;Good to know. Even though I didn't do a deep dive into the code, this comment[1] actually made me think that if there is  a field called subject in the events returned, it will be set as the subject of the email. &lt;/P&gt;

&lt;P&gt;[1] &lt;A href="https://github.com/DiscoveredIntelligence/sendresults/blob/master/bin/sendresults.py#l73"&gt;https://github.com/DiscoveredIntelligence/sendresults/blob/master/bin/sendresults.py#l73&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2015 15:33:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142973#M12470</guid>
      <dc:creator>nibinabr</dc:creator>
      <dc:date>2015-04-15T15:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically set the subject field in sendresults command app ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142974#M12471</link>
      <description>&lt;P&gt;That sounds like a good idea. Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2015 16:27:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142974#M12471</guid>
      <dc:creator>mockd</dc:creator>
      <dc:date>2015-04-15T16:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically set the subject field in sendresults command app ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142975#M12472</link>
      <description>&lt;P&gt;Hi mockd,  Any idea when the next version will be released? Dynamic subject and body would be a bug win here.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2016 11:01:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142975#M12472</guid>
      <dc:creator>tomjones101</dc:creator>
      <dc:date>2016-11-10T11:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically set the subject field in sendresults command app ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142976#M12473</link>
      <description>&lt;P&gt;Its not a direct approach , but splunk map command comes very handy in these cases. For example in the below scenario i want to change the mail subject / email details  by each host name. So i will write the logic on the main search and pass unique host and subject fields to map search.&lt;/P&gt;

&lt;P&gt;This will send the mail results with pre-defined email id / subject by each host you have. You can alter the mail search logic as it suits your requirement.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex | dedup host|eval new_subject=(if(host=abc),"abc",none) .....etc logic|eval mail_id=If(host=abc,"abc@splunk.com",none).....etc logic | table host new_subject mail_id |map search=" search index=myindex  host=$host$ | table _time user action other-fields ..... |eval email_to=$mail_id$ |sendresults showemail=f subject=$new_subject$ body="Body of the email"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Apr 2017 15:05:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142976#M12473</guid>
      <dc:creator>Ravan</dc:creator>
      <dc:date>2017-04-17T15:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically set the subject field in sendresults command app ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142977#M12474</link>
      <description>&lt;P&gt;Any update on this one. I have been trying to send the alert with the dynamic subject. Any help is appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2018 21:29:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142977#M12474</guid>
      <dc:creator>chandrasekharko</dc:creator>
      <dc:date>2018-08-21T21:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically set the subject field in sendresults command app ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142978#M12475</link>
      <description>&lt;P&gt;Hi, if you reach out to us on the support address listed on the details section of the Splunkbase page for Sendresults, I can send you a beta version we finally have ready to be tested.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 20:29:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142978#M12475</guid>
      <dc:creator>mockd</dc:creator>
      <dc:date>2018-08-30T20:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically set the subject field in sendresults command app ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142979#M12476</link>
      <description>&lt;P&gt;Updating this old post to advise&lt;/P&gt;

&lt;P&gt;email_subj and email_body are now a supported field as of &lt;A href="https://splunkbase.splunk.com/app/1794/" target="_blank"&gt;sendresults&lt;/A&gt; 4.0&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:29:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142979#M12476</guid>
      <dc:creator>gjanders</dc:creator>
      <dc:date>2020-09-29T21:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically set the subject field in sendresults command app ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142980#M12477</link>
      <description>&lt;P&gt;I am getting the following error with the new version. &lt;BR /&gt;
command="sendresults", Error : All results must contain a field named email_to with the intended recipient.&lt;/P&gt;

&lt;P&gt;I am not what I am missing in the query.&lt;BR /&gt;
index=mtr source="mine" level=ERROR &lt;BR /&gt;
| sort - _time &lt;BR /&gt;
| eval Time = strftime(_time, "%m/%d/%y %I:%M:%S %p") &lt;BR /&gt;
| eventstats count as TOTAL_COUNT &lt;BR /&gt;
| eval criticality = case(TOTAL_COUNT &amp;gt; 100, "Critical", TOTAL_COUNT &amp;gt;= 50, "Warning", 1==1, "Info") &lt;BR /&gt;
| eval email_to=case(&lt;BR /&gt;
    match(criticality,"Critical"), "&lt;A href="mailto:chandra.kolla@xyz.com" target="_blank"&gt;chandra.kolla@xyz.com&lt;/A&gt;", &lt;BR /&gt;
    match(criticality,"Warning"), "&lt;A href="mailto:abcd@gmail.com" target="_blank"&gt;abcd@gmail.com&lt;/A&gt;",&lt;BR /&gt;
    match(criticality,"Info"), "&lt;A href="mailto:chandra.kolla@qwerty.com" target="_blank"&gt;chandra.kolla@qwerty.com&lt;/A&gt;") &lt;BR /&gt;
| eval email_subj=case(&lt;BR /&gt;
    match(criticality,"Critical"),"Critical Severity Errors",&lt;BR /&gt;
    match(criticality,"Warning"),"High Severity Errors",&lt;BR /&gt;
    match(criticality,"Info"),"Info Severity Errors") &lt;BR /&gt;
| table Time,level,serviceName,requestId,ipAddress,logger,message,email &lt;BR /&gt;
| sendresults&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:34:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142980#M12477</guid>
      <dc:creator>chandrasekharko</dc:creator>
      <dc:date>2020-09-29T21:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically set the subject field in sendresults command app ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142981#M12478</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Are you including all the necessary field in your table command that the sendresults command requires? From your example it looks like the email_to and email_subj are not.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:32:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142981#M12478</guid>
      <dc:creator>mockd</dc:creator>
      <dc:date>2020-09-29T21:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically set the subject field in sendresults command app ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142982#M12479</link>
      <description>&lt;P&gt;Yes I think.&lt;/P&gt;

&lt;P&gt;| eval email_to=case(&lt;BR /&gt;
match(criticality,"Critical"), "&lt;A href="mailto:chandra.kolla@xyz.com" target="_blank"&gt;chandra.kolla@xyz.com&lt;/A&gt;", &lt;BR /&gt;
match(criticality,"Warning"), "&lt;A href="mailto:abcd@gmail.com" target="_blank"&gt;abcd@gmail.com&lt;/A&gt;",&lt;BR /&gt;
match(criticality,"Info"), "&lt;A href="mailto:chandra.kolla@qwerty.com" target="_blank"&gt;chandra.kolla@qwerty.com&lt;/A&gt;") &lt;BR /&gt;
| eval email_subj=case(&lt;BR /&gt;
match(criticality,"Critical"),"Critical Severity Errors",&lt;BR /&gt;
match(criticality,"Warning"),"High Severity Errors",&lt;BR /&gt;
match(criticality,"Info"),"Info Severity Errors") &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:35:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142982#M12479</guid>
      <dc:creator>chandrasekharko</dc:creator>
      <dc:date>2020-09-29T21:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically set the subject field in sendresults command app ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142983#M12480</link>
      <description>&lt;P&gt;I am sorry. It makes sense now. I got it.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 19:12:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142983#M12480</guid>
      <dc:creator>chandrasekharko</dc:creator>
      <dc:date>2018-10-09T19:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically set the subject field in sendresults command app ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142984#M12481</link>
      <description>&lt;P&gt;Actually, the table column headers aren't in a constant pattern for the alert every-time. 1 time it shows in 1 order, some other time the column names are in another order.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 20:01:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142984#M12481</guid>
      <dc:creator>chandrasekharko</dc:creator>
      <dc:date>2018-10-09T20:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically set the subject field in sendresults command app ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142985#M12482</link>
      <description>&lt;P&gt;Actually, with the newer version of sendresults app, which is 4.0, the table column headers aren't in a constant pattern for the alert every-time. 1 time it shows in 1 order, some other time the column names are in another order.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/314iB850C8E40D8CAB11/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/315iE8E52037206231E5/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 20:06:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142985#M12482</guid>
      <dc:creator>chandrasekharko</dc:creator>
      <dc:date>2018-10-09T20:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically set the subject field in sendresults command app ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142986#M12483</link>
      <description>&lt;P&gt;Hi, thanks for raising the issue. Can you email &lt;A href="mailto:support@discoveredintelligence.ca"&gt;support@discoveredintelligence.ca&lt;/A&gt; and we can look into this issue a bit deeper.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 20:24:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142986#M12483</guid>
      <dc:creator>mockd</dc:creator>
      <dc:date>2018-10-09T20:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically set the subject field in sendresults command app ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142987#M12484</link>
      <description>&lt;P&gt;FYI may be worth creating a new question for the next question around this, I only bumped this old question to advise it was now possible to use a dynamic subject!&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 20:43:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-dynamically-set-the-subject-field-in-sendresults-command/m-p/142987#M12484</guid>
      <dc:creator>gjanders</dc:creator>
      <dc:date>2018-10-09T20:43:03Z</dc:date>
    </item>
  </channel>
</rss>

