<?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: timechart with range (_time) not working in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/timechart-with-range-time-not-working/m-p/325443#M97036</link>
    <description>&lt;P&gt;Thanks. It works perfectly. Additionally can this be bucketed for every hour? I ask this cause a range can extend over another bucket in which case how will the contextId placed ?&lt;/P&gt;</description>
    <pubDate>Thu, 14 Dec 2017 09:04:49 GMT</pubDate>
    <dc:creator>hariatsplunk</dc:creator>
    <dc:date>2017-12-14T09:04:49Z</dc:date>
    <item>
      <title>timechart with range (_time) not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-with-range-time-not-working/m-p/325441#M97034</link>
      <description>&lt;P&gt;I have created two event types from logs to capture messaging events received and processed, having same contextId; from which I am trying to chart the duration of time taken to process an message by contextId. But the time is in milliseconds which does not work with timechart and it displays zero.&lt;/P&gt;

&lt;P&gt;I tried the following &lt;BR /&gt;
1. eventtype="Message Received" OR eventtype="Message processed" | timechart span=30mins range(_time) by contextId WHERE max in top10&lt;BR /&gt;
2. eventtype="Message Received" OR eventtype="Message processed" | transaction range(_time) as duration by contextId | chart range(_time) by contextId&lt;BR /&gt;
3. eventtype="Message Received" OR eventtype="Message processed" | timechart span=30mins range(_time) by contextId WHERE max in top10 | convert ctime(_time) &lt;/P&gt;

&lt;P&gt;what is working, &lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;eventtype="Message Received" OR eventtype="Message processed" | stats range(_time) as durationms by contextId | eval duration = durationms/1000 - But not want eval column and also want to bucket in every hour&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;But actually requirement is timechart top 50 message processing events (contextIds) which has taken more than 1 sec in milliseconds in every hour. &lt;/P&gt;

&lt;P&gt;My observation is,  stats and transactions do not work in range(evaled fields). Neither bucket produces correct result. If I bucket range function for 30 mins it results the _time as 1800 secs &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:07:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-with-range-time-not-working/m-p/325441#M97034</guid>
      <dc:creator>hariatsplunk</dc:creator>
      <dc:date>2020-09-29T17:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: timechart with range (_time) not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-with-range-time-not-working/m-p/325442#M97035</link>
      <description>&lt;P&gt;Hi@hariatsplunk,&lt;/P&gt;

&lt;P&gt;You can try the query below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventtype="Message Received" OR eventtype="Message processed" | convert timeformat="%m/%d/%Y,%H:%M:%S.%3N" ctime(_time) AS c_time | eval time=strptime(c_time, "%m/%d/%Y,%H:%M:%S.%3N") | stats range(time) as time by contextid| eval time=round(time*1000) | where time&amp;gt;1000 | sort - time limit=50
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let me know if this helps!!!!&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 12:57:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-with-range-time-not-working/m-p/325442#M97035</guid>
      <dc:creator>deepashri_123</dc:creator>
      <dc:date>2017-12-13T12:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: timechart with range (_time) not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-with-range-time-not-working/m-p/325443#M97036</link>
      <description>&lt;P&gt;Thanks. It works perfectly. Additionally can this be bucketed for every hour? I ask this cause a range can extend over another bucket in which case how will the contextId placed ?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2017 09:04:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-with-range-time-not-working/m-p/325443#M97036</guid>
      <dc:creator>hariatsplunk</dc:creator>
      <dc:date>2017-12-14T09:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: timechart with range (_time) not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-with-range-time-not-working/m-p/325444#M97037</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;You can try dis:&lt;BR /&gt;
    eventtype="Message Received" OR eventtype="Message processed" | convert timeformat="%m/%d/%Y,%H:%M:%S.%3N" ctime(_time) AS c_time | eval time=strptime(c_time, "%m/%d/%Y,%H:%M:%S.%3N") |bin _time span=60m| stats range(time) as time by contextid| eval time=round(time*1000) | where time&amp;gt;1000 | sort - time limit=50&lt;/P&gt;

&lt;P&gt;Hope this helps!!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:14:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-with-range-time-not-working/m-p/325444#M97037</guid>
      <dc:creator>deepashri_123</dc:creator>
      <dc:date>2020-09-29T17:14:37Z</dc:date>
    </item>
  </channel>
</rss>

