If you want to extract a data field then you can do the following:
Note this is a log file that has , as delimiters.
You can then use two methods:
1 - using delims: http://www.splunk.com/base/Documentation/4.1.5/Knowledge/Createandmaintainsearch-timefieldextractionsthroughconfigurationfiles#Configuring_delimiter-based_field_extraction
2 - Using a regex. (note that your timestamp is always the 4th field, so setting up a regex that grabs this should work) something like: ^[^,]*,[^,]*,[^,]*,(\w+)
Basically a props.conf that does something like this:
[yoursourcetype]
EXTRACT-TIME = ^[^,]*,[^,]*,[^,]*,(?P<time>\w+)
However i think you can actually get the correct timestamp by trying to modify this:
http://www.splunk.com/base/Documentation/4.1.5/admin/Configuretimestamprecognition
specifically:
[yoursource or sourcetype]
DATETIME_CONFIG = <filename relative to $SPLUNK_HOME>
MAX_TIMESTAMP_LOOKAHEAD = <integer>
TIME_PREFIX = <regular expression>
TIME_FORMAT = <strptime-style format>
TZ = <posix timezone string>
MAX_DAYS_AGO = <integer>
MAX_DAYS_HENCE = <integer>
so in your case i think it should be:
TIME_PREFIX = ^[^,]*,[^,]*,[^,]*,
TIME_FORMAT = %y%m%d%H%M%S
Try that and let me know if it works,
.gz
... View more