<?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 create top command results in timechart? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-top-command-results-in-timechart/m-p/320693#M95824</link>
    <description>&lt;P&gt;Yep, it works.&lt;/P&gt;

&lt;P&gt;If I add in a &lt;CODE&gt;|timechart values(perc) by errorCode&lt;/CODE&gt; it creates a visualization.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 07 Mar 2018 12:06:51 GMT</pubDate>
    <dc:creator>brajaram</dc:creator>
    <dc:date>2018-03-07T12:06:51Z</dc:date>
    <item>
      <title>How to create top command results in timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-top-command-results-in-timechart/m-p/320691#M95822</link>
      <description>&lt;P&gt;I'm trying to make a timechart to show percentage of error rates over a given time period. What I am looking for from a visualization perspective is a line chart that shows for any binned time period, what the total count of a specific error was, and what the overall percentage that was, and to have the chart be drawn based on the percentage.&lt;/P&gt;

&lt;P&gt;Ideally, I'd have both counts and percents on the same chart, but percentage is the important one so I can calculate percentage error over a given timeperiod.&lt;/P&gt;

&lt;P&gt;So far, my query is as follows: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Initial Search to create the necessary variables|table errorCode _time|bin span=5m _time| eventstats count as total by _time 
| stats count values(total) as total by _time, errorCode
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;errorCode contains a variety of values, with one value corresponding to success. In theory this should give me a table that looks like &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_time               errorCode               count          total
Bucket1          ErrorCode1             X                  X+Y+Z
Bucket1          ErrorCode2             Y                  X+Y+Z
Bucket1          Success                Z                  X+Y+Z 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;From there I would be able to use an &lt;CODE&gt;eval perc=count/total*100&lt;/CODE&gt; to be able to build the timechart. However, the total column is incorrect and does not result in the correct values. What would be a better way to build this query out, and is it possible to have the chart be drawn based on percent, but have in any given tooltip percent and count values?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 19:48:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-top-command-results-in-timechart/m-p/320691#M95822</guid>
      <dc:creator>brajaram</dc:creator>
      <dc:date>2018-03-06T19:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to create top command results in timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-top-command-results-in-timechart/m-p/320692#M95823</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Initial Search to create the necessary variables 
| bin span=5m _time 
| table errorCode _time 
| stats count by _time, errorCode 
| eventstats sum(count) as total by _time 
| eval perc=round((count*100)/total,2)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 05:49:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-top-command-results-in-timechart/m-p/320692#M95823</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-03-07T05:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to create top command results in timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-top-command-results-in-timechart/m-p/320693#M95824</link>
      <description>&lt;P&gt;Yep, it works.&lt;/P&gt;

&lt;P&gt;If I add in a &lt;CODE&gt;|timechart values(perc) by errorCode&lt;/CODE&gt; it creates a visualization.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 12:06:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-top-command-results-in-timechart/m-p/320693#M95824</guid>
      <dc:creator>brajaram</dc:creator>
      <dc:date>2018-03-07T12:06:51Z</dc:date>
    </item>
  </channel>
</rss>

