<?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 do you modify your raw data in Splunk? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-modify-your-raw-data-in-Splunk/m-p/377376#M168078</link>
    <description>&lt;P&gt;Yes I agree we don't need to mention explicitly &lt;/P&gt;</description>
    <pubDate>Fri, 27 Jul 2018 12:50:38 GMT</pubDate>
    <dc:creator>m7787580</dc:creator>
    <dc:date>2018-07-27T12:50:38Z</dc:date>
    <item>
      <title>How do you modify your raw data in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-modify-your-raw-data-in-Splunk/m-p/377369#M168071</link>
      <description>&lt;P&gt;Hello Splunkers,&lt;/P&gt;

&lt;P&gt;My original data looks like this for a particular day in a below example. &lt;/P&gt;

&lt;P&gt;Currently, there are 10 entries in a day sometimes it's 4 entries and it's totally random. I would like to reshape my data as per hour and whenever there are no entries in an hour it should fill it as zero. TIME AND VALUE are the main key fields.&lt;/P&gt;

&lt;P&gt;ORIGINAL DATA&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;             _time                 TIME          Value
1    2018-07-26 23:43:01.079    26-JUL-2018 00  2
2    2018-07-26 23:43:01.079    26-JUL-2018 04  2
3    2018-07-26 23:43:01.079    26-JUL-2018 06  2
4    2018-07-26 23:43:01.079    26-JUL-2018 09  2
5    2018-07-26 23:43:01.078    26-JUL-2018 12  2
6    2018-07-26 23:43:01.078    26-JUL-2018 15  3
7    2018-07-26 23:43:01.078    26-JUL-2018 16  4
8    2018-07-26 17:43:04.176    26-JUL-2018 18  2
9    2018-07-26 15:43:01.062    26-JUL-2018 21  1
10   2018-07-26 09:43:01.160    26-JUL-2018 23  1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like to change into per hour of raw data and fill with Zero for the time period where we don't have logs in Splunk.&lt;/P&gt;

&lt;P&gt;REQUIRED DATA&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;     TIME                 Value
1   7/26/2018 0:00  2
2   7/26/2018 1:00  0
3   7/26/2018 2:00  0
4   7/26/2018 3:00  0
5   7/26/2018 4:00  2
6   7/26/2018 5:00  0
7   7/26/2018 6:00  2
8   7/26/2018 7:00     0
9   7/26/2018 8:00     0
10   7/26/2018 9:00    2
11   7/26/2018 10:00    0
12   7/26/2018 11:00    0
13   7/26/2018 12:00    2
14   7/26/2018 13:00    0
15   7/26/2018 14:00    0
16   7/26/2018 15:00    3
17   7/26/2018 16:00    4
18   7/26/2018 17:00    0
19   7/26/2018 18:00    2
20   7/26/2018 19:00    0
21   7/26/2018 20:00    0
22   7/26/2018 21:00    1
23   7/26/2018 22:00    0
24   7/26/2018 23:00    1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks in advance for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 11:16:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-modify-your-raw-data-in-Splunk/m-p/377369#M168071</guid>
      <dc:creator>m7787580</dc:creator>
      <dc:date>2018-07-27T11:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do you modify your raw data in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-modify-your-raw-data-in-Splunk/m-p/377370#M168072</link>
      <description>&lt;P&gt;what if there are two values for the same hour. how do you aggregate them? do you want sum the values which are there in the same hour or count ?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 11:31:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-modify-your-raw-data-in-Splunk/m-p/377370#M168072</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2018-07-27T11:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do you modify your raw data in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-modify-your-raw-data-in-Splunk/m-p/377371#M168073</link>
      <description>&lt;P&gt;I would like to add them.&lt;BR /&gt;
Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 11:33:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-modify-your-raw-data-in-Splunk/m-p/377371#M168073</guid>
      <dc:creator>m7787580</dc:creator>
      <dc:date>2018-07-27T11:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do you modify your raw data in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-modify-your-raw-data-in-Splunk/m-p/377372#M168074</link>
      <description>&lt;P&gt;_row data can not be changed. I think that you can edit it with a search sentence.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(your search)
| eval _time=strptime(TIME,"%d-%b-%Y %H")|bin _time span=1h 
| stats sum(Value) as Value by _time
| makecontinuous _time span=1h
| fillnull value=0 Value

※This query will create data up to the latest TIME.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Jul 2018 12:00:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-modify-your-raw-data-in-Splunk/m-p/377372#M168074</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2018-07-27T12:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do you modify your raw data in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-modify-your-raw-data-in-Splunk/m-p/377373#M168075</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=index host=splunk-test  sourcetype=sample 
| makecontinuous _time span=1h
| timechart span=1h sum(value)
| fillnull value=0 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Jul 2018 12:17:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-modify-your-raw-data-in-Splunk/m-p/377373#M168075</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2018-07-27T12:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do you modify your raw data in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-modify-your-raw-data-in-Splunk/m-p/377374#M168076</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Try something like below,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=index host=splunk-test  sourcetype=sample 
 | makecontinuous _time span=1h
 | timechart span=1h sum(value)
 | fillnull value=0 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Jul 2018 12:18:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-modify-your-raw-data-in-Splunk/m-p/377374#M168076</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2018-07-27T12:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do you modify your raw data in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-modify-your-raw-data-in-Splunk/m-p/377375#M168077</link>
      <description>&lt;P&gt;Won't the timechart already make it continuous? No need for the explicit &lt;CODE&gt;| makecontinuous&lt;/CODE&gt; I think?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 12:47:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-modify-your-raw-data-in-Splunk/m-p/377375#M168077</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-07-27T12:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do you modify your raw data in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-modify-your-raw-data-in-Splunk/m-p/377376#M168078</link>
      <description>&lt;P&gt;Yes I agree we don't need to mention explicitly &lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 12:50:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-modify-your-raw-data-in-Splunk/m-p/377376#M168078</guid>
      <dc:creator>m7787580</dc:creator>
      <dc:date>2018-07-27T12:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do you modify your raw data in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-modify-your-raw-data-in-Splunk/m-p/377377#M168079</link>
      <description>&lt;P&gt;what if there is no data for 1 full hour.I am not sure this time will be considered. if empty hours also consider then no need of | makecontinuous&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 12:50:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-modify-your-raw-data-in-Splunk/m-p/377377#M168079</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2018-07-27T12:50:52Z</dc:date>
    </item>
  </channel>
</rss>

