Getting Data In

using access-combined I am not able to get the correct date

sphariss
New Member

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.

These are the values that SPLUNK is giving me for the date (exported to csv file):

date_hour = 23
date_mday = 20
date_minute = 55
date_month = febuary
date_second = 9
date_wday = saturday
date_year = 2010
date_zone = -420

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.

99.123.123.123 - - [23/Feb/2013:23:55:09 -0700] "GET /page.php HTTP/1.1" 200 15745 "http://www.website.com/page.php" "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"

0 Karma

kristian_kolb
Ultra Champion

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 props.conf;

TIME_PREFIX
TIME_FORMAT
MAX_TIMESTAMP_LOOKAHEAD

http://docs.splunk.com/Documentation/Splunk/5.0.2/Admin/Propsconf

For TIME_FORMAT it will be good to know how to specify the strptime variables, see http://www.strftime.net

I believe that your props.conf should look something like;

[your sourcetype]
MAX_TIMESTAMP_LOOKAHEAD = 50
TIME_PREFIX = \[
TIME_FORMAT = %d/%b/%Y:%H:%M:%S %z
the rest of your props parameters here

These settings should go into a props.conf file on the indexer (or the heavy forwarder if you use that).

Hope this helps,

Kristian

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...