If I have a custom sourcetype with fields delimited by
,, the first field in the data is what I want to extract as the event time. What should be in the transforms.conf file for the FIELDS = ?
The data looks like:
05-Oct-2016 12:45:17, Jon, Sally, Sue,
How should I configure transforms.conf?
FIELDS = ????, Name1, Name2, Name3
Splunk should automatically recognize the time format. You can name the field Time since Splunk would have extracted the _time field
The timestamp recognition is configured in the props.conf and not the transforms.conf (all transforms.conf settings are executed after Timestamp recognition). This this link for details on what all attributes that you need to setup for timestamp recognition. It's recommended that you explicitly specify these attributes for better indexing performance as automatic recognition can cause extra processing.
I generally configure these 3 attributes at the least. Here is what you can use for your situation
props.conf (on indexer/heavy forwarder)
[yoursourcetype] TIME_PREFIX = ^ TIME_FORMAT = %d-%b-%Y %H:%M:%S MAX_TIMESTAMP_LOOKAHEAD = 20 ..other settings..
Yes, I tried that but nothing gets indexed at all. Can this be done from a Universal forwarder?
So, when you say noting gets indexed at all, do you mean you've an input.conf on your forwarder which is monitoring this CSV file and sending to Indexer but Indexer is dropping all events? (That doesn't seem right)
The easiest way is to take an example in a file and follow the guided ingestion, in this way you can be sure to take correct timestamp and fields.
After you can use this sourcetype for your usual ingestion.
TimeStamp is assigned to an event by the Indexer in the Index phase not in the input phase
yes, but timestamp (_time) is assigned to an event by the indexer not by the forwarder.
I have configured on my indexer in the
TIMEPREFIX = ^
SHOULDLINEMERGE = False
pulldown_type = 1
DELIMS = ","
FIELDS = Name1,Name2,Name3