<?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 to sum the values in a field over a specific time span? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-sum-the-values-in-a-field-over-a-specific-time-span/m-p/132827#M36267</link>
    <description>&lt;P&gt;As extracted by your regex, Time has spaces in it. May be that's why sum fails. &lt;/P&gt;

&lt;P&gt;Try this instead:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; *HttpRequestProcessor | rex field=LogLine "\s(?&amp;lt;Time&amp;gt;\d+)\s" | rex field=TimeStamp_Thread "(?&amp;lt;dt2&amp;gt;[\d]{4}-[\d]{2}-[\d]{2} [\d]{1,2}:[\d]{1,2}[\d]{1,2}:[\d]{2}.[\d]{3})"  | convert num(Time)    | eval time5=strptime(dt2,"%Y-%m-%d %H")  | eval _time=time5  | bucket _time span=1h | stats sum(Time) by _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 19 Sep 2014 17:40:31 GMT</pubDate>
    <dc:creator>sk314</dc:creator>
    <dc:date>2014-09-19T17:40:31Z</dc:date>
    <item>
      <title>How to sum the values in a field over a specific time span?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sum-the-values-in-a-field-over-a-specific-time-span/m-p/132826#M36266</link>
      <description>&lt;P&gt;New to splunk!&lt;/P&gt;

&lt;P&gt;I'm currently having trouble trying to sum values in a field over a specific time span...&lt;/P&gt;

&lt;P&gt;My search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;*HttpRequestProcessor | rex field=LogLine "(?&amp;lt;Time&amp;gt;\s\d+\s)" | rex field=TimeStamp_Thread "(?&amp;lt;dt2&amp;gt;[\d]{4}-[\d]{2}-[\d]{2} [\d]{1,2}:[\d]{1,2}[\d]{1,2}:[\d]{2}.[\d]{3})"  | convert num(Time)    | eval time5=strptime(dt2,"%Y-%m-%d %H")  | eval _time=time5  | bucket _time span=1h | stats count(Time) by _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;instead of count(Time) what I really want is sum(Time) however, when I use that syntax, no stats are returned...what am I missing here? &lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 19 Sep 2014 17:27:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sum-the-values-in-a-field-over-a-specific-time-span/m-p/132826#M36266</guid>
      <dc:creator>chatham</dc:creator>
      <dc:date>2014-09-19T17:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum the values in a field over a specific time span?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sum-the-values-in-a-field-over-a-specific-time-span/m-p/132827#M36267</link>
      <description>&lt;P&gt;As extracted by your regex, Time has spaces in it. May be that's why sum fails. &lt;/P&gt;

&lt;P&gt;Try this instead:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; *HttpRequestProcessor | rex field=LogLine "\s(?&amp;lt;Time&amp;gt;\d+)\s" | rex field=TimeStamp_Thread "(?&amp;lt;dt2&amp;gt;[\d]{4}-[\d]{2}-[\d]{2} [\d]{1,2}:[\d]{1,2}[\d]{1,2}:[\d]{2}.[\d]{3})"  | convert num(Time)    | eval time5=strptime(dt2,"%Y-%m-%d %H")  | eval _time=time5  | bucket _time span=1h | stats sum(Time) by _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Sep 2014 17:40:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sum-the-values-in-a-field-over-a-specific-time-span/m-p/132827#M36267</guid>
      <dc:creator>sk314</dc:creator>
      <dc:date>2014-09-19T17:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum the values in a field over a specific time span?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sum-the-values-in-a-field-over-a-specific-time-span/m-p/132828#M36268</link>
      <description>&lt;P&gt;Genius! That worked! Thanks a lot, sk314!&lt;/P&gt;</description>
      <pubDate>Fri, 19 Sep 2014 17:46:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sum-the-values-in-a-field-over-a-specific-time-span/m-p/132828#M36268</guid>
      <dc:creator>chatham</dc:creator>
      <dc:date>2014-09-19T17:46:52Z</dc:date>
    </item>
  </channel>
</rss>

