<?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 graph or report based on value? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/graph-or-report-based-on-value/m-p/28089#M43769</link>
    <description>&lt;P&gt;new to splunk, sorry if this is trivial.&lt;/P&gt;

&lt;P&gt;by default the timeline graph are draw based on number of occurrence. I want something different.&lt;/P&gt;

&lt;P&gt;say my log entry are like this:&lt;/P&gt;

&lt;P&gt;Timestamp=2011/11/30 15:31:32.424, Timespent=0.4063&lt;BR /&gt;
Timestamp=2011/11/30 15:24:16.653, Timespent=1.0156&lt;BR /&gt;
Timestamp=2011/11/30 15:17:01.522, Timespent=0.4219&lt;BR /&gt;
Timestamp=2011/11/30 15:09:28.907, Timespent=0.1250&lt;BR /&gt;
Timestamp=2011/11/30 15:02:09.526, Timespent=0.1406&lt;BR /&gt;
Timestamp=2011/11/30 14:55:10.615, Timespent=0.6875&lt;/P&gt;

&lt;P&gt;1). is it possible to create report/graph using Timestamp field as X-axis and Timespent field as Y-axis?&lt;BR /&gt;
2). how to create report that shows number of records(or percentage) that Timespent values are between 0-0.5 and 0.5-1.0 etc?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Dec 2011 22:15:56 GMT</pubDate>
    <dc:creator>tinhuty</dc:creator>
    <dc:date>2011-12-02T22:15:56Z</dc:date>
    <item>
      <title>graph or report based on value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/graph-or-report-based-on-value/m-p/28089#M43769</link>
      <description>&lt;P&gt;new to splunk, sorry if this is trivial.&lt;/P&gt;

&lt;P&gt;by default the timeline graph are draw based on number of occurrence. I want something different.&lt;/P&gt;

&lt;P&gt;say my log entry are like this:&lt;/P&gt;

&lt;P&gt;Timestamp=2011/11/30 15:31:32.424, Timespent=0.4063&lt;BR /&gt;
Timestamp=2011/11/30 15:24:16.653, Timespent=1.0156&lt;BR /&gt;
Timestamp=2011/11/30 15:17:01.522, Timespent=0.4219&lt;BR /&gt;
Timestamp=2011/11/30 15:09:28.907, Timespent=0.1250&lt;BR /&gt;
Timestamp=2011/11/30 15:02:09.526, Timespent=0.1406&lt;BR /&gt;
Timestamp=2011/11/30 14:55:10.615, Timespent=0.6875&lt;/P&gt;

&lt;P&gt;1). is it possible to create report/graph using Timestamp field as X-axis and Timespent field as Y-axis?&lt;BR /&gt;
2). how to create report that shows number of records(or percentage) that Timespent values are between 0-0.5 and 0.5-1.0 etc?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2011 22:15:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/graph-or-report-based-on-value/m-p/28089#M43769</guid>
      <dc:creator>tinhuty</dc:creator>
      <dc:date>2011-12-02T22:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: graph or report based on value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/graph-or-report-based-on-value/m-p/28090#M43770</link>
      <description>&lt;P&gt;Sure. Use &lt;CODE&gt;timechart&lt;/CODE&gt;!&lt;/P&gt;

&lt;P&gt;First, some explanation on how &lt;CODE&gt;timechart&lt;/CODE&gt; behaves: &lt;CODE&gt;timechart&lt;/CODE&gt; needs some kind of statistical function that returns a unique value for the timespan it's operating on. If you don't define the timespan yourself it will be set dynamically depending on what timerange the whole search spans, but let's take an example where the timespan is 1 minute and that somewhere in your log you have 3 of these events occurring within 1 minute. Splunk needs to know how to give you ONE value for "Value", even though there are 3 values of each. You can tell Splunk to just give you an average from the 3 events using the stats function avg:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | timechart span=1m avg(Timespent) as Timespent
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or, if you only want the values from the first of the events within the time period, use &lt;CODE&gt;first&lt;/CODE&gt; instead of &lt;CODE&gt;avg&lt;/CODE&gt;. Want the sum? Use &lt;CODE&gt;sum&lt;/CODE&gt;. And so on. More information on statistical functions is available here: &lt;A href="http://www.splunk.com/base/Documentation/latest/SearchReference/Stats"&gt;http://www.splunk.com/base/Documentation/latest/SearchReference/Stats&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;There's also a second way to do this, which is to produce a table containing timestamps and values yourself and then feed them into the chart.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | table _time Timespent
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As for the second question, you can achieve this by using &lt;CODE&gt;bucket&lt;/CODE&gt; to divide Timespend into the intervals you want. Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | bucket Timespent span=0.5 | stats count by Timespent
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Dec 2011 22:28:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/graph-or-report-based-on-value/m-p/28090#M43770</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2011-12-02T22:28:24Z</dc:date>
    </item>
  </channel>
</rss>

