<?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 using access-combined I am not able to get the correct date in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/using-access-combined-I-am-not-able-to-get-the-correct-date/m-p/68964#M97032</link>
    <description>&lt;P&gt;I am having problems getting splunk to read my log file correctly.  as you can see from the below example, the reported dates are WAY off from reality.&lt;/P&gt;

&lt;P&gt;These are the values that SPLUNK is giving me for the date (exported to csv file):&lt;/P&gt;

&lt;P&gt;date_hour = 23&lt;BR /&gt;
date_mday = 20 &lt;BR /&gt;
date_minute = 55 &lt;BR /&gt;
date_month = febuary &lt;BR /&gt;
date_second = 9 &lt;BR /&gt;
date_wday = saturday&lt;BR /&gt;
date_year = 2010 &lt;BR /&gt;
date_zone = -420&lt;/P&gt;

&lt;P&gt;This is the corresponding RAW log line, as you can see, there is no Feb 9, 2010 date for it to grab.  It does appear to grab the correct time, but the date and the timezone is incorrect.&lt;/P&gt;

&lt;P&gt;99.123.123.123 - - [23/Feb/2013:23:55:09 -0700] "GET /page.php HTTP/1.1" 200 15745 "&lt;A href="http://www.website.com/page.php" target="_blank"&gt;http://www.website.com/page.php&lt;/A&gt;" "Mozilla/5.0 (iPad; CPU OS 6_1 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10B141 Safari/8536.25"&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 13:33:52 GMT</pubDate>
    <dc:creator>sphariss</dc:creator>
    <dc:date>2020-09-28T13:33:52Z</dc:date>
    <item>
      <title>using access-combined I am not able to get the correct date</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/using-access-combined-I-am-not-able-to-get-the-correct-date/m-p/68964#M97032</link>
      <description>&lt;P&gt;I am having problems getting splunk to read my log file correctly.  as you can see from the below example, the reported dates are WAY off from reality.&lt;/P&gt;

&lt;P&gt;These are the values that SPLUNK is giving me for the date (exported to csv file):&lt;/P&gt;

&lt;P&gt;date_hour = 23&lt;BR /&gt;
date_mday = 20 &lt;BR /&gt;
date_minute = 55 &lt;BR /&gt;
date_month = febuary &lt;BR /&gt;
date_second = 9 &lt;BR /&gt;
date_wday = saturday&lt;BR /&gt;
date_year = 2010 &lt;BR /&gt;
date_zone = -420&lt;/P&gt;

&lt;P&gt;This is the corresponding RAW log line, as you can see, there is no Feb 9, 2010 date for it to grab.  It does appear to grab the correct time, but the date and the timezone is incorrect.&lt;/P&gt;

&lt;P&gt;99.123.123.123 - - [23/Feb/2013:23:55:09 -0700] "GET /page.php HTTP/1.1" 200 15745 "&lt;A href="http://www.website.com/page.php" target="_blank"&gt;http://www.website.com/page.php&lt;/A&gt;" "Mozilla/5.0 (iPad; CPU OS 6_1 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10B141 Safari/8536.25"&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:33:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/using-access-combined-I-am-not-able-to-get-the-correct-date/m-p/68964#M97032</guid>
      <dc:creator>sphariss</dc:creator>
      <dc:date>2020-09-28T13:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: using access-combined I am not able to get the correct date</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/using-access-combined-I-am-not-able-to-get-the-correct-date/m-p/68965#M97033</link>
      <description>&lt;P&gt;All right, there seems to be something wrong with how Splunk parses the timestamp. I think you need to explicitly configure how this is parsed - through the following config parameters in &lt;CODE&gt;props.conf&lt;/CODE&gt;;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_PREFIX
TIME_FORMAT
MAX_TIMESTAMP_LOOKAHEAD
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.2/Admin/Propsconf"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.2/Admin/Propsconf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;For TIME_FORMAT it will be good to know how to specify the strptime variables, see &lt;A href="http://www.strftime.net"&gt;http://www.strftime.net&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I believe that your &lt;CODE&gt;props.conf&lt;/CODE&gt; should look something like;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your sourcetype]
MAX_TIMESTAMP_LOOKAHEAD = 50
TIME_PREFIX = \[
TIME_FORMAT = %d/%b/%Y:%H:%M:%S %z
the rest of your props parameters here
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;These settings should go into a &lt;CODE&gt;props.conf&lt;/CODE&gt; file on the indexer (or the heavy forwarder if you use that).&lt;/P&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;

&lt;P&gt;Kristian&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2013 08:11:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/using-access-combined-I-am-not-able-to-get-the-correct-date/m-p/68965#M97033</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-03-21T08:11:31Z</dc:date>
    </item>
  </channel>
</rss>

