<?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: milliseconds in _time in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/milliseconds-in-time/m-p/69524#M14118</link>
    <description>&lt;P&gt;I don't know if it's mis-parsing the data and getting milliseconds, but that's a separate issue. You can fix that by providing explicit TIME_FORMAT and TIME_PREFIX to match your data. &lt;/P&gt;

&lt;P&gt;As for reporting, however, you should simply be able to do:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| timechart span=1s sum(column3)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or use whatever time span you like. &lt;/P&gt;

&lt;P&gt;Also, I'm not sure why you'd need &lt;CODE&gt;stats&lt;/CODE&gt; first. If this is a simplification, and you &lt;EM&gt;do&lt;/EM&gt; need stats, you can force a span onto the with:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | bucket span=10m _time | stats sum(column3) as total_colum3 by _time | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So whether or not the data has milliseconds, you should be able to adjust for it.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Mar 2011 07:04:22 GMT</pubDate>
    <dc:creator>gkanapathy</dc:creator>
    <dc:date>2011-03-29T07:04:22Z</dc:date>
    <item>
      <title>milliseconds in _time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/milliseconds-in-time/m-p/69523#M14117</link>
      <description>&lt;P&gt;Splunk is picking up a csv file that looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SP A,03/27/11 13:10:00,10,4,5,6
SP A,03/27/11 13:20:00,4,4,2,0
SP A,03/27/11 13:30:00,1,1,5,4
...
SP B,03/27/11 13:10:00,15,2,3,6
SP B,03/27/11 13:20:00,1,8,5,0
SP B,03/27/11 13:30:00,2,2,3,4
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My assumption was that I would be able to do this:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| stats sum(column3) as total_column3 by _time |timechart avg(total_column3)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;and end up with 25,5,3.  But splunk is adding milliseconds to _time resulting in unique times/events:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;3/27/11 1:10:00.400 PM  SP A,03/27/11 13:10:00,10,4,5,6
...
3/27/11 1:10:00.247 PM  SP B,03/27/11 13:10:00,15,2,3,6
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I could use the date stamp column from the csv:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| stats sum(column3) as total_column3 by column2 |chart avg(total_column3) by column2&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;but I want to be able to use timechart and adjust span so I don't always have to use 10 minute intervals.  &lt;/P&gt;

&lt;P&gt;Should I be importing the data differently or is there a way around this?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2011 06:21:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/milliseconds-in-time/m-p/69523#M14117</guid>
      <dc:creator>dinisco</dc:creator>
      <dc:date>2011-03-29T06:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: milliseconds in _time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/milliseconds-in-time/m-p/69524#M14118</link>
      <description>&lt;P&gt;I don't know if it's mis-parsing the data and getting milliseconds, but that's a separate issue. You can fix that by providing explicit TIME_FORMAT and TIME_PREFIX to match your data. &lt;/P&gt;

&lt;P&gt;As for reporting, however, you should simply be able to do:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| timechart span=1s sum(column3)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or use whatever time span you like. &lt;/P&gt;

&lt;P&gt;Also, I'm not sure why you'd need &lt;CODE&gt;stats&lt;/CODE&gt; first. If this is a simplification, and you &lt;EM&gt;do&lt;/EM&gt; need stats, you can force a span onto the with:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | bucket span=10m _time | stats sum(column3) as total_colum3 by _time | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So whether or not the data has milliseconds, you should be able to adjust for it.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2011 07:04:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/milliseconds-in-time/m-p/69524#M14118</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-03-29T07:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: milliseconds in _time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/milliseconds-in-time/m-p/69525#M14119</link>
      <description>&lt;P&gt;Thanks again, as always.  The bucket span option did the trick.&lt;/P&gt;

&lt;P&gt;The reason I'm using stats to sum is because I want to sum column3 for SPA and SPB then take an average over time.  If I used sum in timechart it would add column3 and the data would be misrepresented whenever timechart span exceeded 10 mins.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2011 05:12:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/milliseconds-in-time/m-p/69525#M14119</guid>
      <dc:creator>dinisco</dc:creator>
      <dc:date>2011-03-30T05:12:53Z</dc:date>
    </item>
  </channel>
</rss>

