<?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: Email Report format in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/What-is-Email-Report-format/m-p/631077#M14741</link>
    <description>&lt;P&gt;This answer appears to no longer be valid.&amp;nbsp; Can you provide newer documentation on how to do this?&lt;/P&gt;</description>
    <pubDate>Wed, 15 Feb 2023 21:45:14 GMT</pubDate>
    <dc:creator>CutieHoney</dc:creator>
    <dc:date>2023-02-15T21:45:14Z</dc:date>
    <item>
      <title>What is Email Report format?</title>
      <link>https://community.splunk.com/t5/Alerting/What-is-Email-Report-format/m-p/83112#M1150</link>
      <description>&lt;P&gt;I have an alert that sends an email every day at 6:00 AM that is formated in a table to show me the systems that have been rebooted in the last 24 hours.&lt;/P&gt;
&lt;P&gt;in the email is the content of the search that was run:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Name: 'Server Restarts' &lt;BR /&gt;**Query Terms: 'index=main EventCode=1074 SourceName=\"USER32\" | rex field=_raw \"Comment:\s(?.&amp;lt;/em&amp;gt;)\&amp;amp;quot; | rex field=Message \&amp;amp;quot;The process\s(?&amp;lt;process&amp;gt;[^\s]+)\&amp;amp;quot; | transaction host maxspan=5m | eval user_count=mvcount(User) | eval final_user=case(user_count == 1, User, user_count &amp;amp;gt; 1, mvindex(User, user_count-1)) | eval process_count=mvcount(process) | eval final_process=case(process_count == 1, process, process_count &amp;amp;gt; 1, mvindex(process, process_count-1)) | table &amp;lt;em&amp;gt;time host final_user final_process comment | rename _time AS Time | convert timeformat=\&amp;amp;quot;%m/%d/%Y. %H:%M:%S\&amp;amp;quot; ctime(Time) | rename final_user AS Username | rename final_process AS \&amp;amp;quot;Process name\&amp;amp;quot; | rename comment AS \&amp;amp;quot;Comment\&amp;amp;quot;&amp;amp;#39; &amp;lt;br&amp;gt; Link to results: &amp;lt;a href="&lt;A href="https://xxx.xxx.xxx.48:8000/app/search/@go?sid=scheduler&amp;quot;&amp;gt;https://xxx.xxx.xxx.48:8000/app/search/@go?sid=scheduler&amp;lt;/a&amp;gt;&amp;lt;/em&amp;gt;&amp;lt;em&amp;gt;mikeh&amp;lt;/em&amp;gt;_search_RVNDRyBTZXJ2ZXIgUmVzdGFydHM_at_1317207600_5ee867f493492a6e" target="_blank" rel="noopener"&gt;https://xxx.xxx.xxx.48:8000/app/search/@go?sid=scheduler"&amp;gt;https://xxx.xxx.xxx.48:8000/app/search/@go?sid=scheduler&amp;lt;/a&amp;gt;&amp;lt;/em&amp;gt;&amp;lt;em&amp;gt;mikeh&amp;lt;/em&amp;gt;_search_RVNDRyBTZXJ2ZXIgUmVzdGFydHM_at_1317207600_5ee867f493492a6e&lt;/A&gt; &amp;lt;br&amp;gt; Alert was triggered because of: &amp;amp;#39;Saved Search [Server Restarts]: number of events(4)&amp;amp;#39;** &amp;lt;/p&amp;gt; &amp;lt;p&amp;gt;Time host Username Process name Comment&amp;lt;br&amp;gt; 09/28/2011. 05:30:00 XXXWEB02 ESCG\cfldap winlogon.exe 60&amp;lt;br&amp;gt; 09/28/2011. 05:00:03 XXXAPP03 NT AUTHORITY\SYSTEM PSSDNSVC.EXE&amp;lt;br&amp;gt; 09/27/2011. 11:51:23 XXXUSERAPPS XXX\xxxxS Explorer.EXE&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; 09/27/2011. 11:22:40 XXXAPP10 NT AUTHORITY\SYSTEM svchost.exe *&amp;lt;/p&amp;gt; &amp;lt;p&amp;gt;I want the email to have only the tabel without the search text in &amp;lt;strong&amp;gt;bold&amp;lt;/strong&amp;gt; above&amp;lt;/p&amp;gt; &amp;lt;p&amp;gt;How do i get this info out of the email alert????&amp;lt;/p&amp;gt; &amp;lt;/p&amp;gt; &lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 00:40:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/What-is-Email-Report-format/m-p/83112#M1150</guid>
      <dc:creator>hartfoml</dc:creator>
      <dc:date>2023-02-16T00:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Email Report format</title>
      <link>https://community.splunk.com/t5/Alerting/What-is-Email-Report-format/m-p/83113#M1151</link>
      <description>&lt;P&gt;This is quite easy. In Splunk, the e-mail alert is just triggered by saved-search then it will call the python script in $SPLUNK_HOME/etc/apps/search/bin/sendemail.py, and in this script, you can find part of code in mail function:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;if pdfview:
    intro += 'Scheduled view delivery.\n\nA PDF snapshot has been generated for the view: %s.\n\n' % pdfview

else:
    intro += "Saved search results.\n\n"

    if settings != None:
        user  = settings.get("user", None)
        if user != None:
            intro += "User: \'" + user + "\'\n"

    ssName = argvals.get("ssname", None)
    if ssName != None:
        if not plainText:
            ssName = cgi.escape(ssName)
        intro += "Name: \'" + ssName + "\'\n"

    query = argvals.get("ssquery", None)
    **********************Here You Can comment the following 4th line**********************
    1.if query != None:
    2.    if not plainText:
    3.        query = cgi.escape(query)
    4.    intro += "Query Terms: \'" + query + "\'\n"
    ...
    ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 29 Sep 2011 06:19:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/What-is-Email-Report-format/m-p/83113#M1151</guid>
      <dc:creator>hjwang</dc:creator>
      <dc:date>2011-09-29T06:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Email Report format</title>
      <link>https://community.splunk.com/t5/Alerting/What-is-Email-Report-format/m-p/83114#M1152</link>
      <description>&lt;P&gt;Starting in Splunk 6.1, this ability is built into the product. Edit your search and look under the "Click to edit email action" link in the "Alert Actions" section. It's a simple check box you can uncheck. It's in the picture in step 4. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.1/Alert/Setupalertactions"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.1/Alert/Setupalertactions&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2014 23:24:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/What-is-Email-Report-format/m-p/83114#M1152</guid>
      <dc:creator>DerekB</dc:creator>
      <dc:date>2014-05-22T23:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Email Report format</title>
      <link>https://community.splunk.com/t5/Alerting/What-is-Email-Report-format/m-p/631077#M14741</link>
      <description>&lt;P&gt;This answer appears to no longer be valid.&amp;nbsp; Can you provide newer documentation on how to do this?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 21:45:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/What-is-Email-Report-format/m-p/631077#M14741</guid>
      <dc:creator>CutieHoney</dc:creator>
      <dc:date>2023-02-15T21:45:14Z</dc:date>
    </item>
  </channel>
</rss>

