<?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: Another timestamp question in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/88002#M18259</link>
    <description>&lt;P&gt;Thanks! I will move the props.conf to our Heavy Forwarder.&lt;/P&gt;</description>
    <pubDate>Thu, 06 Oct 2011 20:41:49 GMT</pubDate>
    <dc:creator>Greg_LeBlanc</dc:creator>
    <dc:date>2011-10-06T20:41:49Z</dc:date>
    <item>
      <title>Another timestamp question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/87990#M18247</link>
      <description>&lt;P&gt;I am having a difficult time extracting the correct timestamp from a specific log.&lt;/P&gt;

&lt;P&gt;As you can see below, the beginning of the log entry there are two timestamps back to back. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2851,10/06/2011,18:59:29,10/06/2011,14:59:29,1011, 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is my props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    [sourcetype]
    MAX_TIMESTAMP_LOOKAHEAD = 20
    TZ = America/New_York
    TIME_PREFIX = \d{4},\d{2}/\d{2}/\d{4},\d{2}\:\d{2}\:\d{2},
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The first timestamp is still being extracted. See anything wrong here?&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;EDIT:&lt;/STRONG&gt; Can I perform these actions on a Universal Forwarder? Now that I think about it, I can't. Only a Heavy forwarder, correct?&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;EDIT:&lt;/STRONG&gt; Looks like this was my fault. I had been trying this on a Universal Forwarder - I moved this to my Heavy Forwarder and it works! Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2011 19:07:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/87990#M18247</guid>
      <dc:creator>Greg_LeBlanc</dc:creator>
      <dc:date>2011-10-06T19:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: Another timestamp question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/87991#M18248</link>
      <description>&lt;P&gt;As far as I can see your  MAX_TIMESTAMP_LOOKAHEAD = 20 only gets you as far as "9:29,10/06/2011,14:59:29,1011,"&lt;/P&gt;

&lt;P&gt;Try changing your MAX_TIMESTAMP_LOOKAHEAD=25.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:57:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/87991#M18248</guid>
      <dc:creator>jdunlea_splunk</dc:creator>
      <dc:date>2020-09-28T09:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: Another timestamp question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/87992#M18249</link>
      <description>&lt;P&gt;Your TIME_PREFIX looks okay in my estimation. It also looks like your MAX_TIMESTAMP_LOOKAHEAD is correct. If that isn't working, I would suggest you try specifying TIME_FORMAT as well. This needs to be done where the data is parsed, so on the Heavy Forwarder, or on the indexer which the forwarder is sending, presuming a forwarder is part of the picture. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/Configuretimestamprecognition" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Data/Configuretimestamprecognition&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I think that this should be the correct format:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT = %m/%d/%Y,%H:%M:%S
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:57:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/87992#M18249</guid>
      <dc:creator>jbsplunk</dc:creator>
      <dc:date>2020-09-28T09:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: Another timestamp question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/87993#M18250</link>
      <description>&lt;P&gt;Oops i got confused on this! Indeed your MAX_TIMESTAMP_LOOKAHEAD is correct.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:57:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/87993#M18250</guid>
      <dc:creator>jdunlea_splunk</dc:creator>
      <dc:date>2020-09-28T09:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: Another timestamp question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/87994#M18251</link>
      <description>&lt;P&gt;This is actually not correct. Using TIME_PREFIX tells splunk what precedes the timestamp. When MAX_TIMESTAMP_LOOKAHEAD is used in conjunction with TIME_PREFIX, you are telling splunk to look ahead as many characters as you've specified after matching the regex in TIME_PREFIX. In this case, it would start at the second timestamp and look 20 characters ahead, means it should see '10/06/2011,14:59:29' as the timestamp.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:57:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/87994#M18251</guid>
      <dc:creator>jbsplunk</dc:creator>
      <dc:date>2020-09-28T09:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: Another timestamp question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/87995#M18252</link>
      <description>&lt;P&gt;Thanks for the answer, I tried this and no luck!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2011 19:56:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/87995#M18252</guid>
      <dc:creator>Greg_LeBlanc</dc:creator>
      <dc:date>2011-10-06T19:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: Another timestamp question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/87996#M18253</link>
      <description>&lt;P&gt;Your %Y needs capitalized to match the 4 digit year.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2011 20:02:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/87996#M18253</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2011-10-06T20:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: Another timestamp question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/87997#M18254</link>
      <description>&lt;P&gt;corrected. thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2011 20:08:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/87997#M18254</guid>
      <dc:creator>jbsplunk</dc:creator>
      <dc:date>2011-10-06T20:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: Another timestamp question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/87998#M18255</link>
      <description>&lt;P&gt;Yep, only on an install that supports indexing (which light and universal disable). &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Deploy/Forwardercapabilities"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Deploy/Forwardercapabilities&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2011 20:21:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/87998#M18255</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2011-10-06T20:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: Another timestamp question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/87999#M18256</link>
      <description>&lt;P&gt;I've never really used the TIME_PREFIX, however from what I'm reading, the parser will try and find the TIME_PREFIX pattern first (which should match &lt;STRONG&gt;2851,10/06/2011,18:59:29,&lt;/STRONG&gt;) and then look the next 20 characters (from MAX_TIMESTAMP_LOOKAHEAD), which should then match &lt;STRONG&gt;10/06/2011,14:59:29,&lt;/STRONG&gt; which includes the comma. And since there is a comma, its not a "true" timestamp, as you will only have either a date or a time in the string. So it is never actually finding the second timestamp. There is also no need to escape the colons.&lt;/P&gt;

&lt;P&gt;Try this: &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;CODE&gt;TIME_FORMAT = %m/%d/%Y,%H:%M:%S&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;TIME_PREFIX = \d{4},\d{2}/\d{2}/\d{4},\d{2}:\d{2}:\d{2},&lt;/CODE&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;More &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/Configuretimestamprecognition"&gt;details here&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2011 20:21:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/87999#M18256</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2011-10-06T20:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: Another timestamp question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/88000#M18257</link>
      <description>&lt;P&gt;The extra character in MAX_TIMESTAMP_LOOKAHEAD shouldn't stop this from working. In fact, sometimes to be safe I'll intentionally add an extra digit if there things like a space or comma. I haven't noticed any strange behavior because of this, but the approach mentioned here is a valid.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:57:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/88000#M18257</guid>
      <dc:creator>jbsplunk</dc:creator>
      <dc:date>2020-09-28T09:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Another timestamp question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/88001#M18258</link>
      <description>&lt;P&gt;I guess I was a little unclear on which comma. I meant the one in the middle of the date and time, not the one on the end.&lt;/P&gt;

&lt;P&gt;10/06/2011*&lt;EM&gt;,&lt;/EM&gt;*14:59:29,&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:57:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/88001#M18258</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2020-09-28T09:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: Another timestamp question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/88002#M18259</link>
      <description>&lt;P&gt;Thanks! I will move the props.conf to our Heavy Forwarder.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2011 20:41:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Another-timestamp-question/m-p/88002#M18259</guid>
      <dc:creator>Greg_LeBlanc</dc:creator>
      <dc:date>2011-10-06T20:41:49Z</dc:date>
    </item>
  </channel>
</rss>

