<?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: Using Tokens in Alert Email in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Using-Tokens-in-Alert-Email/m-p/689472#M16047</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/65114"&gt;@madhav_dholakia&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's what you should put in the alert's config to achieve what you want:&lt;/P&gt;&lt;P&gt;Search:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup &amp;lt;file&amp;gt; &lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Subject:&lt;BR /&gt;Selfheal Alert - $result.Customer$ - $result.CheckName$ - $result.Device$ - $result.MonthYear$ - $result.Status$&lt;BR /&gt;&lt;BR /&gt;Trigger: For each result&lt;BR /&gt;&lt;BR /&gt;Throttle: [check]&lt;BR /&gt;&lt;BR /&gt;Supress results contain-ing field value: Device&lt;BR /&gt;(This will prevent Splunk sending out duplicate alerts for the same device)&lt;BR /&gt;&lt;BR /&gt;Suppress triggering for &amp;lt;some time period&amp;gt;. Set this for however often your lookup-populating report is scheduled to run&lt;/P&gt;</description>
    <pubDate>Tue, 04 Jun 2024 02:26:38 GMT</pubDate>
    <dc:creator>KendallW</dc:creator>
    <dc:date>2024-06-04T02:26:38Z</dc:date>
    <item>
      <title>Using Tokens in Alert Email</title>
      <link>https://community.splunk.com/t5/Alerting/Using-Tokens-in-Alert-Email/m-p/688272#M16034</link>
      <description>&lt;P&gt;Hello, I have an alert setup which reads a lookup file (populated by another report) and if there are any records in the lookup file, emails should be triggered (one for each record).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand this can be done using trigger "for each result" but I want to use some field values from each record and use it as an email subject.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="madhav_dholakia_0-1716369752864.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/30903i76E0C7739B97E90F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="madhav_dholakia_0-1716369752864.png" alt="madhav_dholakia_0-1716369752864.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;in this case, I want 6 emails to be triggered with subject lines as,&lt;/P&gt;&lt;P&gt;Email 1: &lt;EM&gt;Selfheal Alert - Cust A - Tomcat Stopped - Device A1- May-24 - Device Level&lt;/EM&gt;&lt;BR /&gt;Email 2: &lt;EM&gt;Selfheal Alert - Cust A - Tomcat Stopped - Device A2- May-24 - Device Level&lt;/EM&gt;&lt;BR /&gt;Email 3: &lt;EM&gt;Selfheal Alert - Cust B - Failed Job - Device B1- May-24 - Device Level&lt;/EM&gt;&lt;BR /&gt;Email 4: &lt;EM&gt;Selfheal Alert - Cust C - Tomcat Stopped - Device C1- May-24 - Device Level&lt;/EM&gt;&lt;BR /&gt;Email 5: &lt;EM&gt;Selfheal Alert - Cust C - Failed Job- Device C2- May-24 - Device Level&lt;/EM&gt;&lt;BR /&gt;Email 6: &lt;EM&gt;Selfheal Alert - Cust C - Failed Job - Device C3- May-24 - Device Level&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;How can I achieve this?&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2024 09:27:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Using-Tokens-in-Alert-Email/m-p/688272#M16034</guid>
      <dc:creator>madhav_dholakia</dc:creator>
      <dc:date>2024-05-22T09:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using Tokens in Alert Email</title>
      <link>https://community.splunk.com/t5/Alerting/Using-Tokens-in-Alert-Email/m-p/689472#M16047</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/65114"&gt;@madhav_dholakia&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's what you should put in the alert's config to achieve what you want:&lt;/P&gt;&lt;P&gt;Search:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup &amp;lt;file&amp;gt; &lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Subject:&lt;BR /&gt;Selfheal Alert - $result.Customer$ - $result.CheckName$ - $result.Device$ - $result.MonthYear$ - $result.Status$&lt;BR /&gt;&lt;BR /&gt;Trigger: For each result&lt;BR /&gt;&lt;BR /&gt;Throttle: [check]&lt;BR /&gt;&lt;BR /&gt;Supress results contain-ing field value: Device&lt;BR /&gt;(This will prevent Splunk sending out duplicate alerts for the same device)&lt;BR /&gt;&lt;BR /&gt;Suppress triggering for &amp;lt;some time period&amp;gt;. Set this for however often your lookup-populating report is scheduled to run&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2024 02:26:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Using-Tokens-in-Alert-Email/m-p/689472#M16047</guid>
      <dc:creator>KendallW</dc:creator>
      <dc:date>2024-06-04T02:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using Tokens in Alert Email</title>
      <link>https://community.splunk.com/t5/Alerting/Using-Tokens-in-Alert-Email/m-p/689498#M16048</link>
      <description>&lt;P&gt;thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/121137"&gt;@KendallW&lt;/a&gt;&amp;nbsp;- I think $result.field$ will not work in this scenario? I am already using he subject line as you mentioned but it is having a blank value (in Email I receive) for the variables.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2024 07:54:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Using-Tokens-in-Alert-Email/m-p/689498#M16048</guid>
      <dc:creator>madhav_dholakia</dc:creator>
      <dc:date>2024-06-04T07:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: Using Tokens in Alert Email</title>
      <link>https://community.splunk.com/t5/Alerting/Using-Tokens-in-Alert-Email/m-p/689801#M16050</link>
      <description>&lt;P&gt;Hi, Tre this :&lt;BR /&gt;| inputlookup yourlookuo // Read data from the lookup file&lt;BR /&gt;| search NOT $empty$ trigger_email=true // Filter for records with email trigger enabled&lt;BR /&gt;| eval email_subject = "&amp;lt;field_MotherYear&amp;gt; - &amp;lt;field_Customer&amp;gt; - &amp;lt;field_Device&amp;gt;- &amp;lt;field_CheckName&amp;gt; - &amp;lt;field_SelfHealCount&amp;gt;-&amp;lt;field_Status&amp;gt;- &amp;lt;field_Timestamp&amp;gt;" // Construct subject using all fields&lt;BR /&gt;subject = $email_subject // Use the dynamically generated subject&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2024 06:28:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Using-Tokens-in-Alert-Email/m-p/689801#M16050</guid>
      <dc:creator>marysan</dc:creator>
      <dc:date>2024-06-06T06:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using Tokens in Alert Email</title>
      <link>https://community.splunk.com/t5/Alerting/Using-Tokens-in-Alert-Email/m-p/689937#M16053</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/246832"&gt;@marysan&lt;/a&gt;&amp;nbsp;- thanks for this.&lt;/P&gt;&lt;P&gt;I have created this email_subject field and when used within Email Body &lt;EM&gt;$email_subject$&lt;/EM&gt;, it worked fine but not when used in Email Subject. Can you please suggest if I am missing something?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval email_subject=MonthYear." - ".Customer." - ".CheckName." - ".Device&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="madhav_dholakia_0-1717749729927.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31216i052661F770996FA3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="madhav_dholakia_0-1717749729927.png" alt="madhav_dholakia_0-1717749729927.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2024 08:42:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Using-Tokens-in-Alert-Email/m-p/689937#M16053</guid>
      <dc:creator>madhav_dholakia</dc:creator>
      <dc:date>2024-06-07T08:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using Tokens in Alert Email</title>
      <link>https://community.splunk.com/t5/Alerting/Using-Tokens-in-Alert-Email/m-p/689950#M16054</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/65114"&gt;@madhav_dholakia&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I'm not sure&lt;BR /&gt;please remove the last line of my query , I mean this :&lt;BR /&gt;&lt;SPAN&gt;subject = $email_subject // Use the dynamically generated subject&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;then in the subject box in "Edit Alert " put this :&lt;BR /&gt;Alert: $email_subject$&lt;BR /&gt;OR&lt;BR /&gt;$email_subject$&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it doesn't work put an image from edit alert section of your alert hear&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2024 09:55:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Using-Tokens-in-Alert-Email/m-p/689950#M16054</guid>
      <dc:creator>marysan</dc:creator>
      <dc:date>2024-06-07T09:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using Tokens in Alert Email</title>
      <link>https://community.splunk.com/t5/Alerting/Using-Tokens-in-Alert-Email/m-p/690172#M16063</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/246832"&gt;@marysan&lt;/a&gt;&amp;nbsp;- please see attached screenshots for Alert Configuration.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="madhav_dholakia_0-1717999228865.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31247i6CD11FF854FEA432/image-size/medium?v=v2&amp;amp;px=400" role="button" title="madhav_dholakia_0-1717999228865.png" alt="madhav_dholakia_0-1717999228865.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="madhav_dholakia_1-1717999080196.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31245i2F17A44DC9905240/image-size/medium?v=v2&amp;amp;px=400" role="button" title="madhav_dholakia_1-1717999080196.png" alt="madhav_dholakia_1-1717999080196.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="madhav_dholakia_2-1717999138057.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31246i31C0A110C90E8894/image-size/medium?v=v2&amp;amp;px=400" role="button" title="madhav_dholakia_2-1717999138057.png" alt="madhav_dholakia_2-1717999138057.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2024 06:00:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Using-Tokens-in-Alert-Email/m-p/690172#M16063</guid>
      <dc:creator>madhav_dholakia</dc:creator>
      <dc:date>2024-06-10T06:00:50Z</dc:date>
    </item>
  </channel>
</rss>

