<?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 group data by time from csv? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-data-by-time-from-csv/m-p/157390#M44298</link>
    <description>&lt;P&gt;thanks for the answer strive.&lt;/P&gt;

&lt;P&gt;Is it possible to show it as :-&lt;/P&gt;

&lt;P&gt;timestamp    RESULT&lt;BR /&gt;
01-Jan-2014 00:15:00      1234&lt;BR /&gt;
01-Jan-2014 00:15:00      3456&lt;BR /&gt;
01-Jan-2014 00:15:00      6578&lt;/P&gt;

&lt;P&gt;what I am getting now is:&lt;/P&gt;

&lt;P&gt;timestamp    RESULT&lt;BR /&gt;
01-Jan-2014 00:15:00      1234&lt;BR /&gt;
                              3456&lt;BR /&gt;
                              6578&lt;/P&gt;</description>
    <pubDate>Fri, 25 Jul 2014 09:23:17 GMT</pubDate>
    <dc:creator>harshal_chakran</dc:creator>
    <dc:date>2014-07-25T09:23:17Z</dc:date>
    <item>
      <title>How to group data by time from csv?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-data-by-time-from-csv/m-p/157388#M44296</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a csv with two columns, where 1st column is of datetime format :&lt;BR /&gt;
&lt;CODE&gt;"%d-%b-%Y %H:%M:%S"&lt;/CODE&gt;    i.e. &lt;CODE&gt;01-Jan-2014 00:15:00&lt;/CODE&gt;  &amp;amp; second one showing a RESULT (numerical value)&lt;/P&gt;

&lt;P&gt;Is it possible to group my RESULT column with respect to one hour and 6 hours and displaying it in a table?&lt;BR /&gt;
So that in first case I can show only one hour of data and in second case only 6 hours of data.&lt;/P&gt;

&lt;P&gt;Kindly Help...!!!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2014 05:55:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-data-by-time-from-csv/m-p/157388#M44296</guid>
      <dc:creator>harshal_chakran</dc:creator>
      <dc:date>2014-07-25T05:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to group data by time from csv?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-data-by-time-from-csv/m-p/157389#M44297</link>
      <description>&lt;P&gt;Assuming your CSV column names as Time and Result&lt;/P&gt;

&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup test.csv | eval _time=strptime(Time,"%d-%b-%Y %H:%M:%S") | bucket _time span=6h | stats sum(Result) as Total by _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The above example is for 6 hour buckets. You can change span for 1 hour buckets.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2014 06:54:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-data-by-time-from-csv/m-p/157389#M44297</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-07-25T06:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to group data by time from csv?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-data-by-time-from-csv/m-p/157390#M44298</link>
      <description>&lt;P&gt;thanks for the answer strive.&lt;/P&gt;

&lt;P&gt;Is it possible to show it as :-&lt;/P&gt;

&lt;P&gt;timestamp    RESULT&lt;BR /&gt;
01-Jan-2014 00:15:00      1234&lt;BR /&gt;
01-Jan-2014 00:15:00      3456&lt;BR /&gt;
01-Jan-2014 00:15:00      6578&lt;/P&gt;

&lt;P&gt;what I am getting now is:&lt;/P&gt;

&lt;P&gt;timestamp    RESULT&lt;BR /&gt;
01-Jan-2014 00:15:00      1234&lt;BR /&gt;
                              3456&lt;BR /&gt;
                              6578&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2014 09:23:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-data-by-time-from-csv/m-p/157390#M44298</guid>
      <dc:creator>harshal_chakran</dc:creator>
      <dc:date>2014-07-25T09:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to group data by time from csv?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-data-by-time-from-csv/m-p/157391#M44299</link>
      <description>&lt;P&gt;You can use the mvexpand command in this case.&lt;BR /&gt;
yoursearch | mvexpand RESULTS&lt;/P&gt;

&lt;P&gt;But if you used the search mentiond by @strive, you should already have you desired result. Maybe you can post the exact search you used again.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2014 12:28:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-data-by-time-from-csv/m-p/157391#M44299</guid>
      <dc:creator>tom_frotscher</dc:creator>
      <dc:date>2014-07-25T12:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to group data by time from csv?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-data-by-time-from-csv/m-p/157392#M44300</link>
      <description>&lt;P&gt;With the search that i have given you wont get multiple values for a single timestamp. Give sample input and also expected output. We can modify search as per your requirements&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2014 14:26:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-data-by-time-from-csv/m-p/157392#M44300</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-07-25T14:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to group data by time from csv?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-data-by-time-from-csv/m-p/157393#M44301</link>
      <description>&lt;P&gt;actualy I dont want the sum, only the table with all the values relative to that timestamp&lt;/P&gt;</description>
      <pubDate>Mon, 04 Aug 2014 11:07:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-data-by-time-from-csv/m-p/157393#M44301</guid>
      <dc:creator>harshal_chakran</dc:creator>
      <dc:date>2014-08-04T11:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to group data by time from csv?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-data-by-time-from-csv/m-p/157394#M44302</link>
      <description>&lt;P&gt;Just replace "|stats sum(Result) as Total by _time" with " | table _time Result".&lt;/P&gt;</description>
      <pubDate>Mon, 04 Aug 2014 12:39:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-data-by-time-from-csv/m-p/157394#M44302</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-08-04T12:39:41Z</dc:date>
    </item>
  </channel>
</rss>

