<?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: Charting a percentage in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Charting-a-percentage/m-p/65901#M16351</link>
    <description>&lt;P&gt;Thanks. Looks like it did the trick - I'm looking at my training manuals and reference sheets, and I don't see eventstats listed anywhere. What does that do?&lt;/P&gt;</description>
    <pubDate>Sat, 02 Jun 2012 01:53:01 GMT</pubDate>
    <dc:creator>a212830</dc:creator>
    <dc:date>2012-06-02T01:53:01Z</dc:date>
    <item>
      <title>Charting a percentage</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Charting-a-percentage/m-p/65899#M16349</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;How would I chart a percentage of values? I want to count the number of events that match a criteria, and then display in a chart the percentage that match a certain criteria. &lt;/P&gt;</description>
      <pubDate>Fri, 01 Jun 2012 15:40:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Charting-a-percentage/m-p/65899#M16349</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2012-06-01T15:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Charting a percentage</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Charting-a-percentage/m-p/65900#M16350</link>
      <description>&lt;P&gt;Try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere |
stats count by criteria | 
eventstats sum(count) as totalCount |
eval percentage=round(count*100/totalCount,1) |
fields - count totalCount |
chart max(percentage) by criteria
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In the search above &lt;CODE&gt;max(percentage)&lt;/CODE&gt; is really sort of a no-op, as there is only one percentage for each criterion. But you can't just give a field name for the Y argument, you have to give a function...&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jun 2012 16:39:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Charting-a-percentage/m-p/65900#M16350</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-06-01T16:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Charting a percentage</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Charting-a-percentage/m-p/65901#M16351</link>
      <description>&lt;P&gt;Thanks. Looks like it did the trick - I'm looking at my training manuals and reference sheets, and I don't see eventstats listed anywhere. What does that do?&lt;/P&gt;</description>
      <pubDate>Sat, 02 Jun 2012 01:53:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Charting-a-percentage/m-p/65901#M16351</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2012-06-02T01:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: Charting a percentage</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Charting-a-percentage/m-p/65902#M16352</link>
      <description>&lt;P&gt;eventstats calculates a statistic (same functions as stats) - and then adds the results as a field to &lt;EM&gt;every&lt;/EM&gt; event. Just do this and you will be able to see it better:&lt;/P&gt;

&lt;P&gt;yoursearchhere |&lt;BR /&gt;
stats count by criteria | &lt;BR /&gt;
eventstats sum(count) as totalCount&lt;/P&gt;

&lt;P&gt;The totalCount field is the &lt;EM&gt;same&lt;/EM&gt; in every event, because it is the overall total.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2012 20:21:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Charting-a-percentage/m-p/65902#M16352</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-06-04T20:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: Charting a percentage</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Charting-a-percentage/m-p/65903#M16353</link>
      <description>&lt;P&gt;And, just for completeness...eventstats is discussed in &lt;A href="http://docs.splunk.com/Documentation/Splunk/4.3.2/User/UseReportingCommands"&gt;http://docs.splunk.com/Documentation/Splunk/4.3.2/User/UseReportingCommands&lt;/A&gt;, and the reference topic for it is &lt;A href="http://docs.splunk.com/Documentation/Splunk/4.3.2/SearchReference/Eventstats"&gt;http://docs.splunk.com/Documentation/Splunk/4.3.2/SearchReference/Eventstats&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2012 20:43:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Charting-a-percentage/m-p/65903#M16353</guid>
      <dc:creator>ChrisG</dc:creator>
      <dc:date>2012-06-04T20:43:04Z</dc:date>
    </item>
  </channel>
</rss>

