Getting Data In

Timestamp extraction



I've got a csv file with the a date field against events in the format 1-July-2016. Can I create a sourcetype to recognise this as the timestamp for this data set?


0 Karma



In props.conf you can use the following:

* Tells Splunk the type of file and the extraction and/or parsing method
Splunk should use on the file.
CSV - Comma separated value format
TSV - Tab-separated value format
PSV - pipe "|" separated value format
W3C - W3C Extended Extended Log File Format
JSON - JavaScript Object Notation format
* These settings default the values of the remaining settings to the
appropriate values for these known formats.
* Defaults to unset.

* Some CSV and structured files have their timestamp encompass multiple
fields in the event separated by delimiters. This attribute tells Splunk to
specify all such fields which constitute the timestamp in a
comma-separated fashion.
* If not specified, Splunk tries to automatically extract the timestamp of
the event.

* This feature and all of its settings apply at input time, when data is
first read by Splunk. The setting is used on a Splunk system that has
configured inputs acquiring the data.

0 Karma


Hi pdjhh,
yes this is the correct method.
I suggest to use the web interface to find the correct format and sourcetype definition.
With CSV you can set the time field in sourcetype definition.

Anyway, your time format is


Remeber that ingesting CSV inputs, you have to put props.conf on Indexers and also on Forwarders.



0 Karma