<?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: Alert email formatting issue in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Alert-email-formatting-issue/m-p/50099#M679</link>
    <description>&lt;P&gt;The easiest way to control which fields get passed to an alert email is with the &lt;A href="http://www.splunk.com/base/Documentation/latest/SearchReference/Table" rel="nofollow"&gt;table&lt;/A&gt; command instead of &lt;CODE&gt;fields&lt;/CODE&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;process="sudo" incorrect | rex "(?i)^(?:[^:]*:){3}\s+(?P\w+)\s+:" | table uid, host, COMMAND
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But you could also do using &lt;CODE&gt;fields&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;process="sudo" incorrect | rex "(?i)^(?:[^:]*:){3}\s+(?P\w+)\s+:" | fields - _* | fields uid, host, COMMAND
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 15 Sep 2010 00:42:06 GMT</pubDate>
    <dc:creator>ftk</dc:creator>
    <dc:date>2010-09-15T00:42:06Z</dc:date>
    <item>
      <title>Alert email formatting issue</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-email-formatting-issue/m-p/50097#M677</link>
      <description>&lt;P&gt;I've got a saved search that's emailing me results up to this morning it was sending the results in a table with the fields I'd specified (with the fields command) in addition to _time and _raw.  &lt;/P&gt;

&lt;P&gt;This morning I decided to try and strip _time out of the table, and was unable to get _time out and keep the fields I wanted.  I'm ok with that, more or less for now, but now instead of the table formatting it's all jumbled text that's hard to read.  Is there a way to get the formatting back to the table?&lt;/P&gt;

&lt;P&gt;This is the search:
process="sudo" incorrect | rex "(?i)^(?:[^:]*:){3}\s+(?P\w+)\s+:" | fields uid, host, COMMAND&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2010 00:03:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-email-formatting-issue/m-p/50097#M677</guid>
      <dc:creator>thepocketwade</dc:creator>
      <dc:date>2010-09-15T00:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: Alert email formatting issue</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-email-formatting-issue/m-p/50098#M678</link>
      <description>&lt;P&gt;Can you please post your saved search?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2010 00:39:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-email-formatting-issue/m-p/50098#M678</guid>
      <dc:creator>ftk</dc:creator>
      <dc:date>2010-09-15T00:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Alert email formatting issue</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-email-formatting-issue/m-p/50099#M679</link>
      <description>&lt;P&gt;The easiest way to control which fields get passed to an alert email is with the &lt;A href="http://www.splunk.com/base/Documentation/latest/SearchReference/Table" rel="nofollow"&gt;table&lt;/A&gt; command instead of &lt;CODE&gt;fields&lt;/CODE&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;process="sudo" incorrect | rex "(?i)^(?:[^:]*:){3}\s+(?P\w+)\s+:" | table uid, host, COMMAND
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But you could also do using &lt;CODE&gt;fields&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;process="sudo" incorrect | rex "(?i)^(?:[^:]*:){3}\s+(?P\w+)\s+:" | fields - _* | fields uid, host, COMMAND
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Sep 2010 00:42:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-email-formatting-issue/m-p/50099#M679</guid>
      <dc:creator>ftk</dc:creator>
      <dc:date>2010-09-15T00:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: Alert email formatting issue</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-email-formatting-issue/m-p/50100#M680</link>
      <description>&lt;P&gt;Thanks for your quick help.  I tried using fields, but when I did "fields - _raw, _time" I wound up with other fields that hadn't previously been in the email (e.g. index, process, source etc).&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2010 00:59:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-email-formatting-issue/m-p/50100#M680</guid>
      <dc:creator>thepocketwade</dc:creator>
      <dc:date>2010-09-15T00:59:11Z</dc:date>
    </item>
  </channel>
</rss>

