<?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: Create Missing Records of a Timechart in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Create-Missing-Records-of-a-Timechart/m-p/552647#M9882</link>
    <description>&lt;P&gt;this is not helping, i got the same output as attached&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nouraali_0-1621782958447.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14269i5D786B176A09C296/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nouraali_0-1621782958447.png" alt="nouraali_0-1621782958447.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 23 May 2021 15:16:21 GMT</pubDate>
    <dc:creator>nouraali</dc:creator>
    <dc:date>2021-05-23T15:16:21Z</dc:date>
    <item>
      <title>Create Missing Records of a Timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Create-Missing-Records-of-a-Timechart/m-p/552592#M9880</link>
      <description>&lt;DIV class="p-rich_text_section"&gt;Hi ,&lt;BR /&gt;given the below input (4 mins of sample access log data):&lt;/DIV&gt;&lt;PRE&gt;_time,URI,Bytes&lt;BR /&gt;2021-05-18 02:01:00,a,1&lt;BR /&gt;2021-05-18 02:01:00,a,1&lt;BR /&gt;2021-05-18 02:02:00,a,1&lt;BR /&gt;2021-05-18 02:03:00,b,1&lt;BR /&gt;2021-05-18 02:03:00,b,1&lt;BR /&gt;2021-05-18 02:04:00,a,1&lt;/PRE&gt;&lt;DIV class="p-rich_text_section"&gt;assuming a window of 2 mins from (2:01:00.000 ) to (2:03:00.000), i want to perform some computations (average and standard dev of bytes grouped by URI) as below:&lt;/DIV&gt;&lt;PRE&gt;source="ds1.csv" host="vgspl11hr" index="sfp" sourcetype="csv"&lt;BR /&gt;| table _time,URI,Bytes&lt;BR /&gt;| timechart span=1m  avg(Bytes) AS avg_bytes, stdev(Bytes) AS std_bytes by URI limit=0&lt;BR /&gt;| fillnull value=""&lt;BR /&gt;| untable _time Measure Value&lt;BR /&gt;| eval Metric=mvindex(split(Measure,": "),0),uri=mvindex(split(Measure,": "),1)&lt;BR /&gt;| fields - Measure&lt;BR /&gt;| eval time_uri=_time."__".uri&lt;BR /&gt;| fields - uri - _time&lt;BR /&gt;| xyseries time_uri Metric Value&lt;BR /&gt;| eval _time=mvindex(split(time_uri,"__"),0),uri=mvindex(split(time_uri,"__"),1)&lt;BR /&gt;| fields - time_uri&lt;/PRE&gt;&lt;DIV class="p-rich_text_section"&gt;exact time window between (5/18/21 2:01:00.000 AM to 5/18/21 2:03:00.000 AM), below is the output:&lt;/DIV&gt;&lt;PRE&gt;_time	            uri	avg_bytes	std_bytes&lt;BR /&gt;2021-05-18 02:01:00	a	1			0&lt;BR /&gt;2021-05-18 02:02:00	a	1			0&lt;/PRE&gt;&lt;DIV class="p-rich_text_section"&gt;So, the timechart performed the computations on the existing URIs in the first 2 mins time window, in that case the URI=a.&lt;BR /&gt;However, i want the timechart to consider the existence of the URI = b.&lt;BR /&gt;Is there a way to have the timechart consider all the values of the URI in the computation, even if not all of the URIs existing&amp;nbsp; in that time window?&lt;BR /&gt;I need the output to be as below in the first 2 mins time window:&lt;/DIV&gt;&lt;PRE&gt;_time	            uri	avg_bytes	std_bytes&lt;BR /&gt;2021-05-18 02:01:00	a	1			0&lt;BR /&gt;2021-05-18 02:01:00	b				&lt;BR /&gt;2021-05-18 02:02:00	a	1			0&lt;BR /&gt;2021-05-18 02:02:00	b				&lt;/PRE&gt;&lt;DIV class="p-rich_text_section"&gt;Is that possible?&lt;BR /&gt;I would really appreciate if you helped me.&lt;/DIV&gt;</description>
      <pubDate>Fri, 21 May 2021 20:18:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Create-Missing-Records-of-a-Timechart/m-p/552592#M9880</guid>
      <dc:creator>nouraali</dc:creator>
      <dc:date>2021-05-21T20:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: Create Missing Records of a Timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Create-Missing-Records-of-a-Timechart/m-p/552606#M9881</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231794"&gt;@nouraali&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;source="ds1.csv" host="vgspl11hr" index="sfp" sourcetype="csv"
| fields _time,URI,Bytes 
| append [| inputlookup uri.csv | table URI ] 
| timechart span=1m  avg(Bytes) AS avg_bytes, stdev(Bytes) AS std_bytes by URI limit=0
| fillnull value=""
| untable _time Measure Value
| eval Metric=mvindex(split(Measure,": "),0),uri=mvindex(split(Measure,": "),1)
| fields - Measure
| eval time_uri=_time."__".uri
| fields - uri - _time
| xyseries time_uri Metric Value
| eval _time=mvindex(split(time_uri,"__"),0),uri=mvindex(split(time_uri,"__"),1)
| fields - time_uri&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;▄︻̷̿┻̿═━一&lt;BR /&gt;&lt;BR /&gt;If this reply helps you, an upvote would be appreciated.&lt;/P&gt;</description>
      <pubDate>Sat, 22 May 2021 04:55:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Create-Missing-Records-of-a-Timechart/m-p/552606#M9881</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-05-22T04:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Create Missing Records of a Timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Create-Missing-Records-of-a-Timechart/m-p/552647#M9882</link>
      <description>&lt;P&gt;this is not helping, i got the same output as attached&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nouraali_0-1621782958447.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14269i5D786B176A09C296/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nouraali_0-1621782958447.png" alt="nouraali_0-1621782958447.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 May 2021 15:16:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Create-Missing-Records-of-a-Timechart/m-p/552647#M9882</guid>
      <dc:creator>nouraali</dc:creator>
      <dc:date>2021-05-23T15:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: Create Missing Records of a Timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Create-Missing-Records-of-a-Timechart/m-p/552681#M9883</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231794"&gt;@nouraali&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are getting other URI in below search?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;source="ds1.csv" host="vgspl11hr" index="sfp" sourcetype="csv"
| fields _time,URI,Bytes 
| append [| inputlookup uri.csv | table URI ] 
| timechart span=1m  avg(Bytes) AS avg_bytes, stdev(Bytes) AS std_bytes by URI limit=0&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 24 May 2021 04:54:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Create-Missing-Records-of-a-Timechart/m-p/552681#M9883</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-05-24T04:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Create Missing Records of a Timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Create-Missing-Records-of-a-Timechart/m-p/552747#M9884</link>
      <description>&lt;P&gt;When i specify a time window of 4 mins&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;(5/18/21 2:01:00.000 AM to 5/18/21 2:05:00.000 AM),&amp;nbsp;&lt;/SPAN&gt;the query returns all URIs &lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;when i specify a time window of 2 mins&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;(5/18/21 2:01:00.000 AM to 5/18/21 2:03:00.000 AM), the query returns the records for the existing URIs in that time window, in my case URI=a.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So the issue occurs when the time window in which i am running the search is not having events with URI=b.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, i was able to sort this out by using:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;| sort _time&lt;BR /&gt;| append&lt;BR /&gt;[| inputlookup uri.csv&lt;BR /&gt;| table uri]&lt;BR /&gt;| rename _time AS t&lt;BR /&gt;| filldown t&lt;BR /&gt;| rename t AS _time&lt;BR /&gt;| dedup _time uri&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This way a record will be created for URI=b in the last bucket in the time window.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 May 2021 10:24:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Create-Missing-Records-of-a-Timechart/m-p/552747#M9884</guid>
      <dc:creator>nouraali</dc:creator>
      <dc:date>2021-05-24T10:24:18Z</dc:date>
    </item>
  </channel>
</rss>

