<?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 get the percentage of  each HTTP status code in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-percentage-of-each-HTTP-status-code/m-p/420709#M120885</link>
    <description>&lt;P&gt;Assuming you have a table reflecting a column of http codes along with a column of count (as "count"), try the following adding the following to your search query;&lt;/P&gt;

&lt;P&gt;| eventstats sum(count) as total&lt;BR /&gt;
| eval code_per = round((count / total)*100,2)."%"&lt;BR /&gt;
| fields - total&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jun 2019 18:31:54 GMT</pubDate>
    <dc:creator>jazzypai</dc:creator>
    <dc:date>2019-06-12T18:31:54Z</dc:date>
    <item>
      <title>How to get the percentage of  each HTTP status code</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-percentage-of-each-HTTP-status-code/m-p/420708#M120884</link>
      <description>&lt;P&gt;I would like to get the percentage of each HTTP status code. I have the count of each status code that appears and I just need a way to divide each code by the total number so I can get the percentage.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 18:01:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-percentage-of-each-HTTP-status-code/m-p/420708#M120884</guid>
      <dc:creator>bryceweb22</dc:creator>
      <dc:date>2019-06-12T18:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the percentage of  each HTTP status code</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-percentage-of-each-HTTP-status-code/m-p/420709#M120885</link>
      <description>&lt;P&gt;Assuming you have a table reflecting a column of http codes along with a column of count (as "count"), try the following adding the following to your search query;&lt;/P&gt;

&lt;P&gt;| eventstats sum(count) as total&lt;BR /&gt;
| eval code_per = round((count / total)*100,2)."%"&lt;BR /&gt;
| fields - total&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 18:31:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-percentage-of-each-HTTP-status-code/m-p/420709#M120885</guid>
      <dc:creator>jazzypai</dc:creator>
      <dc:date>2019-06-12T18:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the percentage of  each HTTP status code</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-percentage-of-each-HTTP-status-code/m-p/420710#M120886</link>
      <description>&lt;P&gt;That didn't completely work for me, but I did use the sum(count) as total which gave me what I was looking for. Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 18:51:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-percentage-of-each-HTTP-status-code/m-p/420710#M120886</guid>
      <dc:creator>bryceweb22</dc:creator>
      <dc:date>2019-06-12T18:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the percentage of  each HTTP status code</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-percentage-of-each-HTTP-status-code/m-p/420711#M120887</link>
      <description>&lt;P&gt;Copy.&lt;/P&gt;

&lt;P&gt;If you want to provide more information we can attempt to work further into making sure it works correctly otherwise I'm glad you were able to make it work and if satisfied, please mark answered &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Have a good day!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 18:56:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-percentage-of-each-HTTP-status-code/m-p/420711#M120887</guid>
      <dc:creator>jazzypai</dc:creator>
      <dc:date>2019-06-12T18:56:33Z</dc:date>
    </item>
  </channel>
</rss>

