<?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 Capture second timestamp that includes subseconds in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Capture-second-timestamp-that-includes-subseconds/m-p/320483#M59806</link>
    <description>&lt;P&gt;Here's an example beginning of an event line&lt;/P&gt;

&lt;P&gt;Oct 20 20:57:03 sfo-prd-wsux02 apache2: [Fri Oct 20 20:57:03.398765 2017] [proxy:error] [pid 32083:tid 140031679186688]&lt;/P&gt;

&lt;P&gt;I'm trying to capture the second timestamp as "Fri Oct 20 20:57:03.398765 2017" that includes the subseconds&lt;/P&gt;

&lt;P&gt;In props.conf I am putting:&lt;/P&gt;

&lt;P&gt;[syslog_apache_error]&lt;BR /&gt;
TIME_PREFIX = ^.*[&lt;BR /&gt;
TIME_FORMAT = %a %b %d %H:%M:%S:.%6N %Y&lt;/P&gt;

&lt;P&gt;However Splunk's timestamp is catching the decimals, please advise.&lt;BR /&gt;
Thank you all&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 16:22:04 GMT</pubDate>
    <dc:creator>vlicoupons</dc:creator>
    <dc:date>2020-09-29T16:22:04Z</dc:date>
    <item>
      <title>Capture second timestamp that includes subseconds</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Capture-second-timestamp-that-includes-subseconds/m-p/320483#M59806</link>
      <description>&lt;P&gt;Here's an example beginning of an event line&lt;/P&gt;

&lt;P&gt;Oct 20 20:57:03 sfo-prd-wsux02 apache2: [Fri Oct 20 20:57:03.398765 2017] [proxy:error] [pid 32083:tid 140031679186688]&lt;/P&gt;

&lt;P&gt;I'm trying to capture the second timestamp as "Fri Oct 20 20:57:03.398765 2017" that includes the subseconds&lt;/P&gt;

&lt;P&gt;In props.conf I am putting:&lt;/P&gt;

&lt;P&gt;[syslog_apache_error]&lt;BR /&gt;
TIME_PREFIX = ^.*[&lt;BR /&gt;
TIME_FORMAT = %a %b %d %H:%M:%S:.%6N %Y&lt;/P&gt;

&lt;P&gt;However Splunk's timestamp is catching the decimals, please advise.&lt;BR /&gt;
Thank you all&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:22:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Capture-second-timestamp-that-includes-subseconds/m-p/320483#M59806</guid>
      <dc:creator>vlicoupons</dc:creator>
      <dc:date>2020-09-29T16:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: Capture second timestamp that includes subseconds</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Capture-second-timestamp-that-includes-subseconds/m-p/320484#M59807</link>
      <description>&lt;P&gt;There is no colon after the seconds in your timestamp, but there is one in your &lt;CODE&gt;TIME_FORMAT&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Try...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; TIME_FORMAT = %a %b %d %H:%M:%S.%6N %Y
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Oct 2017 22:37:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Capture-second-timestamp-that-includes-subseconds/m-p/320484#M59807</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-10-20T22:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: Capture second timestamp that includes subseconds</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Capture-second-timestamp-that-includes-subseconds/m-p/320485#M59808</link>
      <description>&lt;P&gt;Your &lt;CODE&gt;TIME_PREFIX&lt;/CODE&gt; is also doing a &lt;EM&gt;greedy&lt;/EM&gt; match, so it may be passing over the field you want, deciding it doesn't have a valid timestamp, and then defaulting to the first timestamp it sees. Use a &lt;EM&gt;lazy&lt;/EM&gt; match like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_PREFIX=^.*?\[
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That will stop at the first square bracket instead of the last one.&lt;/P&gt;</description>
      <pubDate>Sat, 21 Oct 2017 13:54:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Capture-second-timestamp-that-includes-subseconds/m-p/320485#M59808</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2017-10-21T13:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Capture second timestamp that includes subseconds</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Capture-second-timestamp-that-includes-subseconds/m-p/320486#M59809</link>
      <description>&lt;P&gt;@cpetterborg - good improvement.  No sense overshooting and having to back up.&lt;/P&gt;</description>
      <pubDate>Sun, 22 Oct 2017 18:19:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Capture-second-timestamp-that-includes-subseconds/m-p/320486#M59809</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-10-22T18:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: Capture second timestamp that includes subseconds</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Capture-second-timestamp-that-includes-subseconds/m-p/320487#M59810</link>
      <description>&lt;P&gt;Ah nice catch I must've been hasty on the keyboard and added the extra semicolon after the seconds variable.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2017 16:27:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Capture-second-timestamp-that-includes-subseconds/m-p/320487#M59810</guid>
      <dc:creator>vlicoupons</dc:creator>
      <dc:date>2017-10-23T16:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: Capture second timestamp that includes subseconds</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Capture-second-timestamp-that-includes-subseconds/m-p/320488#M59811</link>
      <description>&lt;P&gt;@vlicoupons - if your issue has been solved, then please accept the answer so the question will show as closed.  Also, please feel free to upvote any comments or other answers you found useful. If you still have open issues regarding this, please let us know how else we can help.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2017 18:08:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Capture-second-timestamp-that-includes-subseconds/m-p/320488#M59811</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-10-23T18:08:35Z</dc:date>
    </item>
  </channel>
</rss>

