<?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: View percentage with count in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/View-percentage-with-count/m-p/488894#M136544</link>
    <description>&lt;P&gt;Thanks a lot! Really helpfull&lt;/P&gt;</description>
    <pubDate>Tue, 24 Sep 2019 12:18:21 GMT</pubDate>
    <dc:creator>jonydupre</dc:creator>
    <dc:date>2019-09-24T12:18:21Z</dc:date>
    <item>
      <title>View percentage with count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/View-percentage-with-count/m-p/488890#M136540</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I'm pretty new to Splunk and I'm trying out different things to challange myself. I completed the fundementals 1 course and started testing on some Linux systems. I'm trying to find unhealthy systems and sort them by "problem". That part works right now, but now I want to show the percentages of the problems.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=Linux HCS "NOT OK" | table HCS host | search host="" | stats count by HCS
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How should I go about summing everything up and getting all percetages based on different problems?&lt;BR /&gt;
In the course they use &lt;CODE&gt;top [field] limit=10&lt;/CODE&gt; to view percentages, but in this case, that's not working.&lt;/P&gt;

&lt;P&gt;Can someone help me out a bit?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 09:42:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/View-percentage-with-count/m-p/488890#M136540</guid>
      <dc:creator>jonydupre</dc:creator>
      <dc:date>2019-09-23T09:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: View percentage with count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/View-percentage-with-count/m-p/488891#M136541</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I think your problem is that you're doing the &lt;CODE&gt;stats&lt;/CODE&gt; before doing the &lt;CODE&gt;top&lt;/CODE&gt;.&lt;BR /&gt;
Try it like that&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=Linux HCS "NOT OK" 
| table HCS host 
| search host="o*" host!="osas*"
| top HCS limit=10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You will have the top 10 of the HCS with the count and the percentage &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Let me know if it works !&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 09:47:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/View-percentage-with-count/m-p/488891#M136541</guid>
      <dc:creator>KailA</dc:creator>
      <dc:date>2019-09-23T09:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: View percentage with count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/View-percentage-with-count/m-p/488892#M136542</link>
      <description>&lt;P&gt;Thanks, that works perfectly. Could you maybe eleborate why &lt;CODE&gt;stats&lt;/CODE&gt; should not be before &lt;CODE&gt;top&lt;/CODE&gt;?&lt;BR /&gt;
I'm trying to learn as much as possible so I would appreciate that a lot!&lt;/P&gt;

&lt;P&gt;Also, is there a way to be more interactive with the community for small questions like this? Something like a chatroom or something? &lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 09:54:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/View-percentage-with-count/m-p/488892#M136542</guid>
      <dc:creator>jonydupre</dc:creator>
      <dc:date>2019-09-23T09:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: View percentage with count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/View-percentage-with-count/m-p/488893#M136543</link>
      <description>&lt;P&gt;Because for this case &lt;CODE&gt;stats count&lt;/CODE&gt; and &lt;CODE&gt;top&lt;/CODE&gt; are doing the same thing, so you have to use only one of them.&lt;BR /&gt;
The difference is that &lt;CODE&gt;top&lt;/CODE&gt; is only doing a count and the give the percentage but &lt;CODE&gt;stats&lt;/CODE&gt; can do a count, sum, average, first or last value... (look at this documentation : &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.3.1/SearchReference/Stats#Stats_function_options"&gt;https://docs.splunk.com/Documentation/Splunk/7.3.1/SearchReference/Stats#Stats_function_options&lt;/A&gt;)&lt;/P&gt;

&lt;P&gt;And for your second question, we have a Slack and you can join us :  splk.it/slack&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 13:54:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/View-percentage-with-count/m-p/488893#M136543</guid>
      <dc:creator>KailA</dc:creator>
      <dc:date>2019-09-23T13:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: View percentage with count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/View-percentage-with-count/m-p/488894#M136544</link>
      <description>&lt;P&gt;Thanks a lot! Really helpfull&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2019 12:18:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/View-percentage-with-count/m-p/488894#M136544</guid>
      <dc:creator>jonydupre</dc:creator>
      <dc:date>2019-09-24T12:18:21Z</dc:date>
    </item>
  </channel>
</rss>

