<?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 How to use timechart or bucket span to view the result every 30 mins using below query? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-or-bucket-span-to-view-the-result-every-30/m-p/657783#M227184</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I want to use&amp;nbsp;timechart or bucket span to view the result every 30 mins using below query.&lt;/P&gt;
&lt;P&gt;Could you please let me know how I can use&amp;nbsp;timechart or&amp;nbsp;bucket span=30m _time here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;index=* handler=traffic &amp;lt;today timerange&amp;gt;&lt;BR /&gt;| stats dc(dsid) as today_Traffic&lt;BR /&gt;| appendcols&lt;BR /&gt;[search index=* handler=traffic &amp;lt;yesterday timerange&amp;gt;&lt;BR /&gt;| stats dc(dsid) as Previous_day_Traffic]&lt;BR /&gt;| eval delta_traffic = today_Traffic-Previous_day_Traffic&lt;/P&gt;</description>
    <pubDate>Mon, 18 Sep 2023 22:10:00 GMT</pubDate>
    <dc:creator>anil1219</dc:creator>
    <dc:date>2023-09-18T22:10:00Z</dc:date>
    <item>
      <title>How to use timechart or bucket span to view the result every 30 mins using below query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-or-bucket-span-to-view-the-result-every-30/m-p/657783#M227184</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I want to use&amp;nbsp;timechart or bucket span to view the result every 30 mins using below query.&lt;/P&gt;
&lt;P&gt;Could you please let me know how I can use&amp;nbsp;timechart or&amp;nbsp;bucket span=30m _time here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;index=* handler=traffic &amp;lt;today timerange&amp;gt;&lt;BR /&gt;| stats dc(dsid) as today_Traffic&lt;BR /&gt;| appendcols&lt;BR /&gt;[search index=* handler=traffic &amp;lt;yesterday timerange&amp;gt;&lt;BR /&gt;| stats dc(dsid) as Previous_day_Traffic]&lt;BR /&gt;| eval delta_traffic = today_Traffic-Previous_day_Traffic&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 22:10:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-or-bucket-span-to-view-the-result-every-30/m-p/657783#M227184</guid>
      <dc:creator>anil1219</dc:creator>
      <dc:date>2023-09-18T22:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: timechart using eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-or-bucket-span-to-view-the-result-every-30/m-p/657789#M227189</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=* handler=traffic &amp;lt;today timerange&amp;gt; OR &amp;lt;yesterday timerange&amp;gt;
| eval day=if(_time &amp;lt; relative_time(now(),"@d"), "yesterday", "today")
| timechart span=30m dc(dsid) as traffic by day
| eval delta_traffic = today-yesterday&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 16 Sep 2023 06:00:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-or-bucket-span-to-view-the-result-every-30/m-p/657789#M227189</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-09-16T06:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: timechart using eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-or-bucket-span-to-view-the-result-every-30/m-p/657832#M227217</link>
      <description>&lt;P&gt;You can use timechart/timewrap if you want to end up with a timechart dataset which you can plot overlaid on each other&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=* handler=traffic (earliest=-1d@d latest=@d) OR (earliest=@d latest=now)
| timechart span=30m dc(dsid) as traffic
| timewrap 1d
| eval delta=traffic_latest_day - traffic_1day_before&lt;/LI-CODE&gt;&lt;P&gt;or you can 'move' the previous day values to 'today' for charting purposes, by just adding 86400 (seconds in a day) to yesterday's value (which is what timewrap effectively does).&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=* handler=traffic (earliest=-1d@d latest=@d) OR (earliest=@d latest=now)
| eval d=if(_time&amp;gt;=relative_time(now(), "@d"), "today", "yesterday")
| eval _time=_time + if(d="yesterday", 86400, 0)
| timechart fixedrange=f span=30m dc(dsid) by d
| eval delta=today-yesterday&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 00:44:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-or-bucket-span-to-view-the-result-every-30/m-p/657832#M227217</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-09-18T00:44:54Z</dc:date>
    </item>
  </channel>
</rss>

