<?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: What is the best timestamp format to use for my custom log to be indexed by Splunk? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-timestamp-format-to-use-for-my-custom-log-to-be/m-p/26538#M4383</link>
    <description>&lt;P&gt;The link has a problem, copy and paste it : &lt;A href="http://dev.splunk.com/view/logging/SP-CAAAFCK"&gt;http://dev.splunk.com/view/logging/SP-CAAAFCK&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jan 2018 11:04:13 GMT</pubDate>
    <dc:creator>splunkreal</dc:creator>
    <dc:date>2018-01-03T11:04:13Z</dc:date>
    <item>
      <title>What is the best timestamp format to use for my custom log to be indexed by Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-timestamp-format-to-use-for-my-custom-log-to-be/m-p/26532#M4377</link>
      <description>&lt;P&gt;What is the best timestamp format to use for my custom log to be indexed by Splunk?&lt;/P&gt;

&lt;P&gt;Sensible choices are:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Round-trip pattern  2010-08-06T16:43:04.1291862-04:00
Full pattern        Friday, August 06, 2010 4:47:02 PM
RFC1123 pattern     Fri, 06 Aug 2010 16:45:17 GMT
ISO 8601 pattern    2010-08-06T16:45:47
UTC sortable        2010-08-06 16:46:36Z
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 07 Aug 2010 03:49:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-timestamp-format-to-use-for-my-custom-log-to-be/m-p/26532#M4377</guid>
      <dc:creator>ftk</dc:creator>
      <dc:date>2010-08-07T03:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best timestamp format to use for my custom log to be indexed by Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-timestamp-format-to-use-for-my-custom-log-to-be/m-p/26533#M4378</link>
      <description>&lt;P&gt;I tend to prefer the Round-trip, ISO, or UTC sortable pattern or ISO pattern with the TZ info. It doesn't matter too much if you specify an explicit format in Splunk, but it's probably best to indicate a 4-digit year, 2-digit 24-hour hours, numeric (rather than locale-specific textually named) months, and an absolutely unambiguous time zone (e.g., EST is &lt;EM&gt;not&lt;/EM&gt; a good TZ). Day of the week is superfluous. Using GMT/UTC/Zulu time helps to avoid errors and problems around DST switches as well, since that zone never switches.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Aug 2010 04:41:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-timestamp-format-to-use-for-my-custom-log-to-be/m-p/26533#M4378</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-08-07T04:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best timestamp format to use for my custom log to be indexed by Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-timestamp-format-to-use-for-my-custom-log-to-be/m-p/26534#M4379</link>
      <description>&lt;P&gt;Great question.  +1  Why has no one else voted this up?&lt;/P&gt;</description>
      <pubDate>Sat, 19 Feb 2011 01:44:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-timestamp-format-to-use-for-my-custom-log-to-be/m-p/26534#M4379</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2011-02-19T01:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best timestamp format to use for my custom log to be indexed by Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-timestamp-format-to-use-for-my-custom-log-to-be/m-p/26535#M4380</link>
      <description>&lt;P&gt;Couldn't tell ya buddy, couldn't tell ya &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Feb 2011 06:06:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-timestamp-format-to-use-for-my-custom-log-to-be/m-p/26535#M4380</guid>
      <dc:creator>ftk</dc:creator>
      <dc:date>2011-02-19T06:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best timestamp format to use for my custom log to be indexed by Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-timestamp-format-to-use-for-my-custom-log-to-be/m-p/26536#M4381</link>
      <description>&lt;P&gt;Also, I am using Reound-trip pattern mostly now, Splunk parses it easily and it is easy to do in PowerShell (get-date -f s).&lt;/P&gt;</description>
      <pubDate>Sat, 19 Feb 2011 06:07:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-timestamp-format-to-use-for-my-custom-log-to-be/m-p/26536#M4381</guid>
      <dc:creator>ftk</dc:creator>
      <dc:date>2011-02-19T06:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best timestamp format to use for my custom log to be indexed by Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-timestamp-format-to-use-for-my-custom-log-to-be/m-p/26537#M4382</link>
      <description>&lt;P&gt;I know this question is ancient, but it can stand using an update.&lt;/P&gt;

&lt;P&gt;Splunk is a time based indexing system, so having correct timestamps is critical. From Splunk's logging best practices ( &lt;A href="http://dev.splunk.com/view/logging/SP-CAAAFCK"&gt;http://dev.splunk.com/view/logging/SP-CAAAFCK&lt;/A&gt; &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Use the most verbose time granularity possible.&lt;/LI&gt;
&lt;LI&gt;Put the timestamp at the beginning of the line. The farther you place a timestamp from the beginning, the more difficult it is to tell it's a timestamp and not other data.&lt;/LI&gt;
&lt;LI&gt;Include a four-digit year.&lt;/LI&gt;
&lt;LI&gt;Include a time zone, preferably a GMT/UTC offset.&lt;/LI&gt;
&lt;LI&gt;Time should be rendered in microseconds in each event. The event could become detached from its original source file at some point, so having the most accurate data about an event is ideal.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;I would say the "best" custom timestamp that meets all those requirements is an RFC3339 compliant timestamp (see &lt;A href="https://tools.ietf.org/html/rfc3339"&gt;https://tools.ietf.org/html/rfc3339&lt;/A&gt; ). For example:&lt;/P&gt;

&lt;P&gt;2017-06-27T14:59:54.158950-04:00.&lt;/P&gt;

&lt;P&gt;The strptime (TIME_FORMAT for Splunk) would be %Y-%m-%dT%T.%6N%:z for that timestamp. &lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 19:16:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-timestamp-format-to-use-for-my-custom-log-to-be/m-p/26537#M4382</guid>
      <dc:creator>vliggio</dc:creator>
      <dc:date>2017-06-27T19:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best timestamp format to use for my custom log to be indexed by Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-timestamp-format-to-use-for-my-custom-log-to-be/m-p/26538#M4383</link>
      <description>&lt;P&gt;The link has a problem, copy and paste it : &lt;A href="http://dev.splunk.com/view/logging/SP-CAAAFCK"&gt;http://dev.splunk.com/view/logging/SP-CAAAFCK&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 11:04:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-timestamp-format-to-use-for-my-custom-log-to-be/m-p/26538#M4383</guid>
      <dc:creator>splunkreal</dc:creator>
      <dc:date>2018-01-03T11:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best timestamp format to use for my custom log to be indexed by Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-timestamp-format-to-use-for-my-custom-log-to-be/m-p/26539#M4384</link>
      <description>&lt;P&gt;Ah, bad html link interpreter - I edited the comment to put a space before the ). Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 14:37:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/What-is-the-best-timestamp-format-to-use-for-my-custom-log-to-be/m-p/26539#M4384</guid>
      <dc:creator>vliggio</dc:creator>
      <dc:date>2018-01-03T14:37:44Z</dc:date>
    </item>
  </channel>
</rss>

