<?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: Verifying what Splunk is using for timestamps? Trying to parse a UNIX Epoch Timestamp in an odd place in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Verifying-what-Splunk-is-using-for-timestamps-Trying-to-parse-a/m-p/66467#M13359</link>
    <description>&lt;P&gt;I'm curious though - why isn't 948431652 being picked up? According to a quick lookup... that should be equal to: "01 / 20 / 00 @ 11:14:12pm EST"&lt;/P&gt;

&lt;P&gt;That aside, is there a way to tell Splunk to drop those events where it can't find a proper timestamp?&lt;/P&gt;</description>
    <pubDate>Fri, 21 Sep 2012 11:29:36 GMT</pubDate>
    <dc:creator>Ricapar</dc:creator>
    <dc:date>2012-09-21T11:29:36Z</dc:date>
    <item>
      <title>Verifying what Splunk is using for timestamps? Trying to parse a UNIX Epoch Timestamp in an odd place</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Verifying-what-Splunk-is-using-for-timestamps-Trying-to-parse-a/m-p/66462#M13354</link>
      <description>&lt;P&gt;I have some log files from an internal application that look like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;hostname|Linux|RHEL6|20Sep2012:1348163022|00:10:13(0days-0hours-10minutes-13secs)|1234|something|else|goes|here but it doesn't matter
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Fields are in the order of...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;hostname|os|os version|DDMonYYYY:TIMESTAMP|time something took to run|pid|etc..|etc..
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need TIMESTAMP.&lt;/P&gt;

&lt;P&gt;I have this in my props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[custom_app_logfile]
MAX_TIMESTAMP_LOOKAHEAD = 10
NO_BINARY_CHECK = 1
REPORT-myfields = transform_mycustom_log
SHOULD_LINEMERGE = false
TIME_FORMAT = %s
TIME_PREFIX = \|[0-9]+[A-Za-z]+[0-9]+:
pulldown_type = 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But it doesn't seem to be working consistently... I have certain entries where the timestamp is correct. But there are ones from back in 2005 that show up as today's date, and many where it's just getting the file's timestamp (also incorrect).&lt;/P&gt;

&lt;P&gt;Questions are:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Is there a way to see exactly what Splunk is deciding to use for it's timestamp? It feels like I'm flying blind editing props.conf and hoping it changes something.&lt;/LI&gt;
&lt;LI&gt;Is there a better approach to pulling that timestamp out? It's a standard UNIX Epoch Timestamp.&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Thu, 20 Sep 2012 21:40:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Verifying-what-Splunk-is-using-for-timestamps-Trying-to-parse-a/m-p/66462#M13354</guid>
      <dc:creator>Ricapar</dc:creator>
      <dc:date>2012-09-20T21:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: Verifying what Splunk is using for timestamps? Trying to parse a UNIX Epoch Timestamp in an odd place</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Verifying-what-Splunk-is-using-for-timestamps-Trying-to-parse-a/m-p/66463#M13355</link>
      <description>&lt;P&gt;I would do use data preview which can be found in Manager » Data inputs » Files &amp;amp; directories » Data preview.  Enter a location containing the data sample.  On the Advanced Mode tab enter your config from your props.conf.  Splunk will highlight the events.&lt;/P&gt;

&lt;P&gt;You could also do a search ...| table _time,_raw |head 20 .  _time should match your time from your raw event.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:29:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Verifying-what-Splunk-is-using-for-timestamps-Trying-to-parse-a/m-p/66463#M13355</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2020-09-28T12:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: Verifying what Splunk is using for timestamps? Trying to parse a UNIX Epoch Timestamp in an odd place</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Verifying-what-Splunk-is-using-for-timestamps-Trying-to-parse-a/m-p/66464#M13356</link>
      <description>&lt;P&gt;I think the problem here is with the TIME_PREFIX, try using this one, I tested it and it matches, whereas the one you have posted didn't:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT = \d{2}\w{3}\d{4}:
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Sep 2012 22:44:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Verifying-what-Splunk-is-using-for-timestamps-Trying-to-parse-a/m-p/66464#M13356</guid>
      <dc:creator>jbsplunk</dc:creator>
      <dc:date>2012-09-20T22:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: Verifying what Splunk is using for timestamps? Trying to parse a UNIX Epoch Timestamp in an odd place</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Verifying-what-Splunk-is-using-for-timestamps-Trying-to-parse-a/m-p/66465#M13357</link>
      <description>&lt;P&gt;If I understand what you're saying, the timestamp you're trying to extract is the epoch value of &lt;CODE&gt;1348163022&lt;/CODE&gt; in the above event.  If I've missed that assumption, the rest of this is all pretty much rubbish.&lt;/P&gt;

&lt;P&gt;Your &lt;CODE&gt;TIME_FORMAT&lt;/CODE&gt; and &lt;CODE&gt;TIME_PREFIX&lt;/CODE&gt; look like they should work.  But, I would probably make a change to make TIME_PREFIX a bit more specific, like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_PREFIX = \|[0-9]{1,2}[A-Z][a-z]{2}[0-9]{4}:
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Just to try to make it less likely to match falsely.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2012 01:35:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Verifying-what-Splunk-is-using-for-timestamps-Trying-to-parse-a/m-p/66465#M13357</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2012-09-21T01:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: Verifying what Splunk is using for timestamps? Trying to parse a UNIX Epoch Timestamp in an odd place</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Verifying-what-Splunk-is-using-for-timestamps-Trying-to-parse-a/m-p/66466#M13358</link>
      <description>&lt;P&gt;dwaddle,&lt;/P&gt;

&lt;P&gt;You're correct on the epoch value.&lt;/P&gt;

&lt;P&gt;For MAX_TIMESTAMP_LOOKAHEAD .. I was under the assumption that that's the amount it looks ahead &lt;EM&gt;after&lt;/EM&gt; it finds the match in TIME_PREFIX (in which case, it'd be the next 10 characters).&lt;/P&gt;

&lt;P&gt;However, I think I found my real issue... &lt;/P&gt;

&lt;P&gt;This is matching correctly:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;hostname|SunOS|5.10|21Mar2009:1237582943|06:04:52(00days-00hours-00minutes-01secs)&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;... but this isn't ...&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;hostname|SunOS|5.10|18Mar2009:948431652|07:51:21(00days-00hours-01minutes-41secs)&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;The timestamp there is still a valid timestamp (although it is wrong)&lt;/P&gt;

&lt;P&gt;(continued on next post)&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:29:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Verifying-what-Splunk-is-using-for-timestamps-Trying-to-parse-a/m-p/66466#M13358</guid>
      <dc:creator>Ricapar</dc:creator>
      <dc:date>2020-09-28T12:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: Verifying what Splunk is using for timestamps? Trying to parse a UNIX Epoch Timestamp in an odd place</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Verifying-what-Splunk-is-using-for-timestamps-Trying-to-parse-a/m-p/66467#M13359</link>
      <description>&lt;P&gt;I'm curious though - why isn't 948431652 being picked up? According to a quick lookup... that should be equal to: "01 / 20 / 00 @ 11:14:12pm EST"&lt;/P&gt;

&lt;P&gt;That aside, is there a way to tell Splunk to drop those events where it can't find a proper timestamp?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2012 11:29:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Verifying-what-Splunk-is-using-for-timestamps-Trying-to-parse-a/m-p/66467#M13359</guid>
      <dc:creator>Ricapar</dc:creator>
      <dc:date>2012-09-21T11:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: Verifying what Splunk is using for timestamps? Trying to parse a UNIX Epoch Timestamp in an odd place</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Verifying-what-Splunk-is-using-for-timestamps-Trying-to-parse-a/m-p/66468#M13360</link>
      <description>&lt;P&gt;You are right about &lt;CODE&gt;MAX_TIMESTAMP_LOOKAHEAD&lt;/CODE&gt;.  I was quite wrong.  I edited my original response.  However, a comment on the &lt;CODE&gt;948431652&lt;/CODE&gt; timestamp - you may be running into &lt;CODE&gt;MAX_DAYS_AGO&lt;/CODE&gt;, as that is over 2000 days ago.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2012 16:07:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Verifying-what-Splunk-is-using-for-timestamps-Trying-to-parse-a/m-p/66468#M13360</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2012-09-21T16:07:11Z</dc:date>
    </item>
  </channel>
</rss>

