<?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 change the format of the table output? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-format-of-the-table-output/m-p/131692#M35926</link>
    <description>&lt;P&gt;Hi jgcsco&lt;BR /&gt;
try this search code&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;     [search] | stats count by Status Errors | eventstats sum(count) as StatusCount by Status| eventstats sum(count) as TotalCount | table  Errors count|appendcols[search Status = "Failed" | eval percent=100*StatusCount/TotalCount | where percent &amp;gt; 1 |dedup percent| table percent] 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 08 Apr 2015 21:51:28 GMT</pubDate>
    <dc:creator>chimell</dc:creator>
    <dc:date>2015-04-08T21:51:28Z</dc:date>
    <item>
      <title>How to change the format of the table output?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-format-of-the-table-output/m-p/131691#M35925</link>
      <description>&lt;P&gt;I have this search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[search] | stats count by Status Errors | eventstats sum(count) as StatusCount by Status| eventstats sum(count) as TotalCount | search Status = "Failed" | eval percent=100*StatusCount/TotalCount | where percent &amp;gt; 1 | table percent Errors count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Which produces the following result:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;percent   Error     count
1.2       error1      A
1.2       error2      B
1.2       error3      C
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Since the percent here is the total error percent, I would like the result to show as the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;percent  1.2
Error    count
error1     A
error2     B
error3     C
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Error    count    percent 1.2
error1     A
error2     B
error3     C
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can this be done?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2015 20:28:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-format-of-the-table-output/m-p/131691#M35925</guid>
      <dc:creator>jgcsco</dc:creator>
      <dc:date>2015-04-08T20:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the format of the table output?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-format-of-the-table-output/m-p/131692#M35926</link>
      <description>&lt;P&gt;Hi jgcsco&lt;BR /&gt;
try this search code&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;     [search] | stats count by Status Errors | eventstats sum(count) as StatusCount by Status| eventstats sum(count) as TotalCount | table  Errors count|appendcols[search Status = "Failed" | eval percent=100*StatusCount/TotalCount | where percent &amp;gt; 1 |dedup percent| table percent] 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Apr 2015 21:51:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-format-of-the-table-output/m-p/131692#M35926</guid>
      <dc:creator>chimell</dc:creator>
      <dc:date>2015-04-08T21:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the format of the table output?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-format-of-the-table-output/m-p/131693#M35927</link>
      <description>&lt;P&gt;Thanks, I was wondering if there is a way to avoid using "appendcols". &lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2015 21:55:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-format-of-the-table-output/m-p/131693#M35927</guid>
      <dc:creator>jgcsco</dc:creator>
      <dc:date>2015-04-08T21:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the format of the table output?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-format-of-the-table-output/m-p/131694#M35928</link>
      <description>&lt;P&gt;This is ugly, and not quite what you're looking for but ...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; $SEARCH | stats count by Status Errors 
| eventstats sum(count) as StatusCount by Status
| eventstats sum(count) as TotalCount | search Status = "Failed" 
| eval percent=100*StatusCount/TotalCount | where percent &amp;gt; 1 
| table percent Errors count
| appendpipe [ | stats max(percent) as count  | eval Errors="percent" ]
| fields - percent
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Apr 2015 22:03:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-format-of-the-table-output/m-p/131694#M35928</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2015-04-08T22:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the format of the table output?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-format-of-the-table-output/m-p/131695#M35929</link>
      <description>&lt;P&gt;Thanks, although a bit ugly, but it is very close to what I am looking for.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2015 00:48:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-format-of-the-table-output/m-p/131695#M35929</guid>
      <dc:creator>jgcsco</dc:creator>
      <dc:date>2015-04-09T00:48:58Z</dc:date>
    </item>
  </channel>
</rss>

