Splunk Version 4.0.11
I’m working on getting Splunk to consume “log” files that I have dumped from a SQL Server helpdesk database. There are a lot of date and time fields in the events as well as dates and times that are included in the free-form text fields. I have managed to extract fields for my journal logs. My assignment log looks like this
2011-10-03^09:15:37^ ^ ^00021361^Brandon^ ^ ^
transforms.conf looks like this
Splunk consumes the data and I can search it but the fields defined in transforms.conf are not available. I’ve tried extracting the fields but with two date fields and two time fields Splunk doesn’t seem able to discriminate between them.
What am I doing wrong?
Here's a quick tip. You don't have to restart Splunk for changes to the .conf files, you can use the extract command with the reload=true option as documented in the Search command cheat sheet: http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/SearchCheatsheet
Extract field/value pairs and reload field extraction settings from disk.
... | extract reload=true
This isn't generally recommended. Although documented it doesn't actually always work very effectively. I have wasted many an hour thinking my configs were at fault when in fact they were fine but Splunk wasn't reloading them! 😉 Best practice would be to restart the system to be sure
You will have to backslash out the "^" because it is an anchor in REGEX.
I took your log snippet and used the following:
[source::...timefile...] sourcetype = timefile REPORT-time = time
[time] DELIMS = "\^" FIELDS = DateAssign,TimeAssign,DateResolv,TimeResolv,CallID,Assignee,Resolution,TotalAsgnmntTime
and now it is working fine creating the fields.
If this helps don't forget to give me some points.
Have you tried it with the FIELDS not surrounded by " "'s. E.g.
Also, have you restarted Splunk? this is required to ensure that the configs are reloaded successfully.