<?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 can I manipulate time stamps to &amp;quot;snap&amp;quot; to 5 minute intervals in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-manipulate-time-stamps-to-quot-snap-quot-to-5-minute/m-p/327453#M160835</link>
    <description>&lt;P&gt;Hello, I'm joining two tables in splunk and their only common attribute is time.  This works well 99% of the time.  Both data sets have time stamps every 5 minutes.  Occasionally one side of the data has a timestamp that is 1 minute off.   Is there a way in splunk to detect the "off" timestamp and round it to the nearest 5 minute mark? &lt;/P&gt;

&lt;P&gt;The timestamps are pieces of the data I am dealing with.  They are not Splunk timestamps.&lt;/P&gt;

&lt;P&gt;Thank you for your time.&lt;/P&gt;</description>
    <pubDate>Mon, 05 Jun 2017 15:15:46 GMT</pubDate>
    <dc:creator>jcouture</dc:creator>
    <dc:date>2017-06-05T15:15:46Z</dc:date>
    <item>
      <title>How can I manipulate time stamps to "snap" to 5 minute intervals</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-manipulate-time-stamps-to-quot-snap-quot-to-5-minute/m-p/327453#M160835</link>
      <description>&lt;P&gt;Hello, I'm joining two tables in splunk and their only common attribute is time.  This works well 99% of the time.  Both data sets have time stamps every 5 minutes.  Occasionally one side of the data has a timestamp that is 1 minute off.   Is there a way in splunk to detect the "off" timestamp and round it to the nearest 5 minute mark? &lt;/P&gt;

&lt;P&gt;The timestamps are pieces of the data I am dealing with.  They are not Splunk timestamps.&lt;/P&gt;

&lt;P&gt;Thank you for your time.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 15:15:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-manipulate-time-stamps-to-quot-snap-quot-to-5-minute/m-p/327453#M160835</guid>
      <dc:creator>jcouture</dc:creator>
      <dc:date>2017-06-05T15:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: How can I manipulate time stamps to "snap" to 5 minute intervals</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-manipulate-time-stamps-to-quot-snap-quot-to-5-minute/m-p/327454#M160836</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your search&amp;gt; | bin span=5min _time | &amp;lt;your stats/join/whatever&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Bin"&gt;bin&lt;/A&gt; command docs&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 15:24:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-manipulate-time-stamps-to-quot-snap-quot-to-5-minute/m-p/327454#M160836</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2017-06-05T15:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: How can I manipulate time stamps to "snap" to 5 minute intervals</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-manipulate-time-stamps-to-quot-snap-quot-to-5-minute/m-p/327455#M160837</link>
      <description>&lt;P&gt;How does this know to look at the timestamp I'm examining?  I should also mention this is not a Splunk timestamp it is an attribute of the table that I have pulled into Splunk from a Db&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 15:30:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-manipulate-time-stamps-to-quot-snap-quot-to-5-minute/m-p/327455#M160837</guid>
      <dc:creator>jcouture</dc:creator>
      <dc:date>2017-06-05T15:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: How can I manipulate time stamps to "snap" to 5 minute intervals</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-manipulate-time-stamps-to-quot-snap-quot-to-5-minute/m-p/327456#M160838</link>
      <description>&lt;P&gt;You can specify a different timestamp:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| bin span=5min &amp;lt;timestamp field&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You may need to look into how that field needs to be formatted to work with the &lt;CODE&gt;bin&lt;/CODE&gt; command.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 15:41:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-manipulate-time-stamps-to-quot-snap-quot-to-5-minute/m-p/327456#M160838</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2017-06-05T15:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: How can I manipulate time stamps to "snap" to 5 minute intervals</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-manipulate-time-stamps-to-quot-snap-quot-to-5-minute/m-p/327457#M160839</link>
      <description>&lt;P&gt;Ok, thank you for your help.  I'll test it the next time I have an anomaly. &lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 16:27:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-manipulate-time-stamps-to-quot-snap-quot-to-5-minute/m-p/327457#M160839</guid>
      <dc:creator>jcouture</dc:creator>
      <dc:date>2017-06-05T16:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: How can I manipulate time stamps to "snap" to 5 minute intervals</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-manipulate-time-stamps-to-quot-snap-quot-to-5-minute/m-p/327458#M160840</link>
      <description>&lt;P&gt;1) The &lt;CODE&gt;span=5m&lt;/CODE&gt; assumes your data is formatted as epoch-time ... as a number (integer or float) where +1 = +1 second.  &lt;/P&gt;

&lt;P&gt;2) &lt;CODE&gt;bin&lt;/CODE&gt; truncates the &lt;CODE&gt;timestamp&lt;/CODE&gt; to the preceding 5m interval.&lt;/P&gt;

&lt;P&gt;3)  If your timestamp is occasionally off by 1 minute, I'd recommend doing a histogram on each source with a span to see where the breaks are.   For example, If source 1 item timestamps are at 4:20-7:45 and 9:15-2:27 minutes, then I'd recommend adding 50 seconds before the bin command, so that the former bin to 5:00 and the latter to 0:00.    &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(your search for one source ) | bin mytime as mytime600 span=10m | bin mytime as mytime10 span=10s | eval mytime0=mytime10-mytime600 | chart count by mytime0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Either way, you're going to have to play around a bit to make sure you are cutting the events  on each side at the right spot so that they match up. &lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 17:56:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-manipulate-time-stamps-to-quot-snap-quot-to-5-minute/m-p/327458#M160840</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-06-05T17:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: How can I manipulate time stamps to "snap" to 5 minute intervals</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-manipulate-time-stamps-to-quot-snap-quot-to-5-minute/m-p/327459#M160841</link>
      <description>&lt;P&gt;Very helpful explanation, thank you.  I think this should work.  I'll update the post when I have found my solution. &lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 19:38:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-manipulate-time-stamps-to-quot-snap-quot-to-5-minute/m-p/327459#M160841</guid>
      <dc:creator>jcouture</dc:creator>
      <dc:date>2017-06-05T19:38:45Z</dc:date>
    </item>
  </channel>
</rss>

