<?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 split time equally in bar chart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-time-equally-in-bar-chart/m-p/125516#M33924</link>
    <description>&lt;P&gt;I don't want to calculate average. i need all points to be plotted in chart(line chart). In Below search if the search results is &amp;lt; 10 I'm able to see the labels. But if the result is &amp;gt; 10 the label stars disappearing. I don't want to show all the time in x-axis. Just 12 points. i.e 00:00, 2:00, 4:00 ..&lt;/P&gt;

&lt;P&gt;index=main sourcetype=myTest host="hello1234" getUserDetail | rex "(?im)^(?:[^:]&lt;EM&gt;:){4}\s(?P&lt;TIMESTAMP&gt;(?P&lt;DATE&gt;[^T]&lt;/DATE&gt;&lt;/TIMESTAMP&gt;&lt;/EM&gt;)T(?P&lt;TIME&gt;[^-]&lt;EM&gt;))-(?:[^,]&lt;/EM&gt;,){6}(?P&lt;SERVICENAME&gt;[^,]+),(?P&lt;OPERATION&gt;[^,]*),(?P&lt;DURATION&gt;[^(ms)]+)ms" | where DURATION &amp;gt;= 10000 | sort -DURATION | chart list(DURATION) by _time&lt;/DURATION&gt;&lt;/OPERATION&gt;&lt;/SERVICENAME&gt;&lt;/TIME&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Jul 2014 15:35:06 GMT</pubDate>
    <dc:creator>th1agarajan</dc:creator>
    <dc:date>2014-07-01T15:35:06Z</dc:date>
    <item>
      <title>How to split time equally in bar chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-time-equally-in-bar-chart/m-p/125513#M33921</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype=myTest host="hello1234" getUserDetail | rex "(?im)^(?:[^:]*:){4}\s(?P&amp;lt;TIMESTAMP&amp;gt;(?P&amp;lt;Date&amp;gt;[^T]*)T(?P&amp;lt;Time&amp;gt;[^\-]*))-(?:[^,]*,){6}(?P&amp;lt;SERVICENAME&amp;gt;[^,]+),(?P&amp;lt;OPERATION&amp;gt;[^,]*),(?P&amp;lt;DURATION&amp;gt;[^(ms)]+)ms" | where DURATION &amp;gt;= 15000 | table DURATION,_time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm creating a bar chart from the above search. The problem I'm facing is&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;I am getting duration in x-axis and time in Y-axis. I need it in vice versa. &lt;/LI&gt;
&lt;LI&gt;I have at least 500 results. Since the result count is more, timestamp value is disappearing. If the result count is around 25 then the timestamp values are visible. I don't want to show all timestamp values in x-axis. My requirement is i am creating report with one day's data. So I want x-axis to be split into 24 pieces (1 hr difference for each point). To make it clear&lt;/LI&gt;
&lt;/OL&gt;

&lt;TABLE border="1"&gt;
&lt;TBODY&gt;&lt;TR&gt;&lt;TH&gt;Time&lt;/TH&gt;&lt;TH&gt;Duration&lt;/TH&gt;&lt;/TR&gt;
&lt;TR&gt;&lt;TD&gt;10:10:00&lt;/TD&gt;&lt;TD align="center"&gt;50&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;&lt;TD&gt;10:12:00&lt;/TD&gt;&lt;TD align="center"&gt;150&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;&lt;TD&gt;10:15:00&lt;/TD&gt;&lt;TD align="center"&gt;500&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;&lt;TD&gt;11:10:00&lt;/TD&gt;&lt;TD align="center"&gt;250&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;&lt;TD&gt;11:30:00&lt;/TD&gt;&lt;TD align="center"&gt;510&lt;/TD&gt;&lt;/TR&gt;
&lt;/TBODY&gt;&lt;/TABLE&gt;

&lt;P&gt;I don't want five points in x-axis. I need only 2 points (10:00:00, 11:00:00). But i want all the points to be marked in chart. Is there a feature in Splunk to accomplish this?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jul 2014 01:03:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-time-equally-in-bar-chart/m-p/125513#M33921</guid>
      <dc:creator>th1agarajan</dc:creator>
      <dc:date>2014-07-01T01:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to split time equally in bar chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-time-equally-in-bar-chart/m-p/125514#M33922</link>
      <description>&lt;P&gt;You're probably looking for &lt;CODE&gt;timechart&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | timechart avg(DURATION)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That will automatically bucket your data into equally sized spans and put the time onto the X-axis.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jul 2014 08:28:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-time-equally-in-bar-chart/m-p/125514#M33922</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-07-01T08:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to split time equally in bar chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-time-equally-in-bar-chart/m-p/125515#M33923</link>
      <description>&lt;P&gt;and you can define the spans for the (1hour) buckets by:&lt;/P&gt;

&lt;P&gt;... | timechart span=1h avg(DURATION)&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jul 2014 11:31:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-time-equally-in-bar-chart/m-p/125515#M33923</guid>
      <dc:creator>Rocket66</dc:creator>
      <dc:date>2014-07-01T11:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to split time equally in bar chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-time-equally-in-bar-chart/m-p/125516#M33924</link>
      <description>&lt;P&gt;I don't want to calculate average. i need all points to be plotted in chart(line chart). In Below search if the search results is &amp;lt; 10 I'm able to see the labels. But if the result is &amp;gt; 10 the label stars disappearing. I don't want to show all the time in x-axis. Just 12 points. i.e 00:00, 2:00, 4:00 ..&lt;/P&gt;

&lt;P&gt;index=main sourcetype=myTest host="hello1234" getUserDetail | rex "(?im)^(?:[^:]&lt;EM&gt;:){4}\s(?P&lt;TIMESTAMP&gt;(?P&lt;DATE&gt;[^T]&lt;/DATE&gt;&lt;/TIMESTAMP&gt;&lt;/EM&gt;)T(?P&lt;TIME&gt;[^-]&lt;EM&gt;))-(?:[^,]&lt;/EM&gt;,){6}(?P&lt;SERVICENAME&gt;[^,]+),(?P&lt;OPERATION&gt;[^,]*),(?P&lt;DURATION&gt;[^(ms)]+)ms" | where DURATION &amp;gt;= 10000 | sort -DURATION | chart list(DURATION) by _time&lt;/DURATION&gt;&lt;/OPERATION&gt;&lt;/SERVICENAME&gt;&lt;/TIME&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jul 2014 15:35:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-time-equally-in-bar-chart/m-p/125516#M33924</guid>
      <dc:creator>th1agarajan</dc:creator>
      <dc:date>2014-07-01T15:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to split time equally in bar chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-time-equally-in-bar-chart/m-p/125517#M33925</link>
      <description>&lt;P&gt;In order to have 500 randomly distributed events fit a chart equally &lt;EM&gt;and&lt;/EM&gt; have each and every event appear with its own column you'll need a huge number of columns - way beyond what you can reasonably chart or display.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jul 2014 15:38:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-time-equally-in-bar-chart/m-p/125517#M33925</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-07-01T15:38:27Z</dc:date>
    </item>
  </channel>
</rss>

