<?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: span not working with db query in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/span-not-working-with-db-query/m-p/358833#M5806</link>
    <description>&lt;P&gt;The span attribute works on the column preceding it. Does the u_short_description field contains timestamp in epoch format? If the u_real_hit_time field contains timestamp, then you need to move span just after that in chart command.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| dbxquery query="SELECT some select statement
| eval u_total_time=u_total_time/1000 
| chart avg(u_total_time) over u_real_hit_time span=1m by u_short_description 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See this for example&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.3/SearchReference/Chart#6:_Chart_the_number_of_events.2C_grouped_by_date_and_hour" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.3/SearchReference/Chart#6:_Chart_the_number_of_events.2C_grouped_by_date_and_hour&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 15:17:24 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2020-09-29T15:17:24Z</dc:date>
    <item>
      <title>span not working with db query</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/span-not-working-with-db-query/m-p/358832#M5805</link>
      <description>&lt;P&gt;i have a search like so :&lt;/P&gt;

&lt;P&gt;| dbxquery query="SELECT some select statement&lt;BR /&gt;
| eval u_total_time=u_total_time/1000 &lt;BR /&gt;
| chart avg(u_total_time) over u_real_hit_time by u_short_description span=1m&lt;/P&gt;

&lt;P&gt;However the span=1 seems to be ignored and the results are still presenting in second intervals.&lt;/P&gt;

&lt;P&gt;I have moved the span cmd to after the chart cmd and also tried using stats and timechart but the span cmd is ignored in all searches.&lt;/P&gt;

&lt;P&gt;Ideas ?&lt;/P&gt;

&lt;P&gt;cheers.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:17:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/span-not-working-with-db-query/m-p/358832#M5805</guid>
      <dc:creator>Esky73</dc:creator>
      <dc:date>2020-09-29T15:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: span not working with db query</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/span-not-working-with-db-query/m-p/358833#M5806</link>
      <description>&lt;P&gt;The span attribute works on the column preceding it. Does the u_short_description field contains timestamp in epoch format? If the u_real_hit_time field contains timestamp, then you need to move span just after that in chart command.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| dbxquery query="SELECT some select statement
| eval u_total_time=u_total_time/1000 
| chart avg(u_total_time) over u_real_hit_time span=1m by u_short_description 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See this for example&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.3/SearchReference/Chart#6:_Chart_the_number_of_events.2C_grouped_by_date_and_hour" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.3/SearchReference/Chart#6:_Chart_the_number_of_events.2C_grouped_by_date_and_hour&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:17:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/span-not-working-with-db-query/m-p/358833#M5806</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-29T15:17:24Z</dc:date>
    </item>
  </channel>
</rss>

