<?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: Create dynamic alert link in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Create-dynamic-alert-link/m-p/673256#M15681</link>
    <description>&lt;P&gt;Based on your description it sounds like you're wanting something pretty custom for your environment.&amp;nbsp; There's not quite this type of data-splitting, alerting, and re-display framework in Splunk.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First suggestion: check out Splunkbase for any add-on's having to do with alerting.&amp;nbsp; Maybe one of these has a good-enough implementation for what you need.&amp;nbsp; Here's the results of the keyword "alert" for all the apps out there:&lt;/P&gt;&lt;P&gt;&lt;A href="https://splunkbase.splunk.com/apps?keyword=alert" target="_blank"&gt;https://splunkbase.splunk.com/apps?keyword=alert&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From what I understand of your description, a big part of what you want is&amp;nbsp;a meaningful display of information to the person handling the alert.&amp;nbsp; One way to solve is to create a Splunk dashboard that expects inputs via the URL - just like the&lt;EM&gt; ?keyword=alert&lt;/EM&gt; in the above URL.&amp;nbsp; When you include values like that in the URL for a dashboard you can access those as tokens (within your SimpleXML, for example).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A lot of times there is the SPL that goes into triggering an alert, and those results have a lot of "plumbing" data in them that helped trigger the alert.&amp;nbsp; So that result set isn't very actionable by the responder.&amp;nbsp; This is why you would create a custom dashboard that expects token inputs (like a timeframe and hostname), and then it renders visualizations for that host in that timeframe that helps them troubleshoot in response to the email.&lt;/P&gt;&lt;P&gt;If you haven't already, install the &lt;A href="https://splunkbase.splunk.com/app/1603" target="_self"&gt;Splunk Dashboard Examples&lt;/A&gt; app - it has a lot of good tips and tricks for creating dashboards.&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jan 2024 17:45:02 GMT</pubDate>
    <dc:creator>_JP</dc:creator>
    <dc:date>2024-01-04T17:45:02Z</dc:date>
    <item>
      <title>Create dynamic alert link</title>
      <link>https://community.splunk.com/t5/Alerting/Create-dynamic-alert-link/m-p/673190#M15679</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;&lt;BR /&gt;I have created an search which returns set of email address and few hosts and using table command to display that.&lt;BR /&gt;&lt;BR /&gt;Result looks like below:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;Hostname&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;Agent Version&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;Email&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;host1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;1.0&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;test1@gmail.com&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;host2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;2.0&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;test2@gmail.com&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="24px"&gt;host3&lt;/TD&gt;&lt;TD height="24px"&gt;2.0&lt;/TD&gt;&lt;TD height="24px"&gt;test1@gmail.com&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="24px"&gt;host4&lt;/TD&gt;&lt;TD height="24px"&gt;2.0&lt;/TD&gt;&lt;TD height="24px"&gt;test1@gmail.com&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Now , I want to send separate emails to &lt;A href="mailto:test1@gmail.com" target="_blank"&gt;test1@gmail.com&lt;/A&gt;&amp;nbsp;and &lt;A href="mailto:test2@gmail.com" target="_blank"&gt;test2@gmail.com&lt;/A&gt;. The email should only contain hosts belonging to them. i.e host1, host3, host4 and its agent version should go to &lt;A href="mailto:test1@gmail.com" target="_blank"&gt;test1@gmail.com&lt;/A&gt;&amp;nbsp;and host2 should go to &lt;A href="mailto:test2@gmail.com" target="_blank"&gt;test2@gmail.com&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I want to embed a link in the alert email body that redirects to search result and should contain hostnames that belong to particular recepient. Can anyone help me how to generate dynamic alert link ?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;PNV&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2024 06:19:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Create-dynamic-alert-link/m-p/673190#M15679</guid>
      <dc:creator>Poojitha</dc:creator>
      <dc:date>2024-01-04T06:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Create dynamic alert link</title>
      <link>https://community.splunk.com/t5/Alerting/Create-dynamic-alert-link/m-p/673256#M15681</link>
      <description>&lt;P&gt;Based on your description it sounds like you're wanting something pretty custom for your environment.&amp;nbsp; There's not quite this type of data-splitting, alerting, and re-display framework in Splunk.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First suggestion: check out Splunkbase for any add-on's having to do with alerting.&amp;nbsp; Maybe one of these has a good-enough implementation for what you need.&amp;nbsp; Here's the results of the keyword "alert" for all the apps out there:&lt;/P&gt;&lt;P&gt;&lt;A href="https://splunkbase.splunk.com/apps?keyword=alert" target="_blank"&gt;https://splunkbase.splunk.com/apps?keyword=alert&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From what I understand of your description, a big part of what you want is&amp;nbsp;a meaningful display of information to the person handling the alert.&amp;nbsp; One way to solve is to create a Splunk dashboard that expects inputs via the URL - just like the&lt;EM&gt; ?keyword=alert&lt;/EM&gt; in the above URL.&amp;nbsp; When you include values like that in the URL for a dashboard you can access those as tokens (within your SimpleXML, for example).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A lot of times there is the SPL that goes into triggering an alert, and those results have a lot of "plumbing" data in them that helped trigger the alert.&amp;nbsp; So that result set isn't very actionable by the responder.&amp;nbsp; This is why you would create a custom dashboard that expects token inputs (like a timeframe and hostname), and then it renders visualizations for that host in that timeframe that helps them troubleshoot in response to the email.&lt;/P&gt;&lt;P&gt;If you haven't already, install the &lt;A href="https://splunkbase.splunk.com/app/1603" target="_self"&gt;Splunk Dashboard Examples&lt;/A&gt; app - it has a lot of good tips and tricks for creating dashboards.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2024 17:45:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Create-dynamic-alert-link/m-p/673256#M15681</guid>
      <dc:creator>_JP</dc:creator>
      <dc:date>2024-01-04T17:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Create dynamic alert link</title>
      <link>https://community.splunk.com/t5/Alerting/Create-dynamic-alert-link/m-p/673412#M15685</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261258"&gt;@_JP&lt;/a&gt;&amp;nbsp;: Yes,proper display of information. Probably, it is pretty much custom requirement. After some research, now I am able to do that with sendemail command .&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt; my initial search here&amp;gt;
| table hostname owner version 
| outputcsv test.csv
| stats values(owner) as email
| mvexpand email 
| eval subject="Test Alert" ,email_body= "This is test email body"
| map  search="|inputcsv test.csv | where owner=\"$email$\" |
 sendemail sendcsv=true to=\"$email$\" subject=\"$subject$\" message="\$email_body$\""&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Example : If I have user test1 and test2 . Hosts that belong to test1 are sent to test1@gmail.com user and hosts that belong to test2 user are sent to &lt;A href="mailto:test2@gmail.com" target="_blank"&gt;test2@gmail.com&lt;/A&gt;. CSV file is getting sent.&lt;BR /&gt;&lt;BR /&gt;But now the problem is subject and emailbody are not getting displayed as I added. Its just showing Splunk Result &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 20:17:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Create-dynamic-alert-link/m-p/673412#M15685</guid>
      <dc:creator>Poojitha</dc:creator>
      <dc:date>2024-01-05T20:17:39Z</dc:date>
    </item>
  </channel>
</rss>

