Getting Data In

The logs I'm searching do not contain a key - value format

src053
Engager

I have log files that do not have a key - value format. The first part of each event is like this:
2013/11/25-17:09:08[32:31.928] however there is nothing in the log file setting this as "time" event.
When I go to import these log files splunk indexes them as the time of the import. Is there something I can do to have splunk tack the first string in the log as the time stamp?

Tags (2)
0 Karma
1 Solution

lukejadamec
Super Champion

On the indexer, you should create or add to the splunk\etc\system\local\props.conf configuration file. I recommend something like this:

props.conf

[yoursourcetype]
MAX_TIMESTAMP_LOOKAHEAD = 20
TIME_FORMAT = %Y/%m/%d-%H:%M:%S

This should extract the timestamp from newly indexed logs (will not change what is already indexed). It depends on the timestamp being contained within the first 20 characters of the log event.

View solution in original post

lukejadamec
Super Champion

On the indexer, you should create or add to the splunk\etc\system\local\props.conf configuration file. I recommend something like this:

props.conf

[yoursourcetype]
MAX_TIMESTAMP_LOOKAHEAD = 20
TIME_FORMAT = %Y/%m/%d-%H:%M:%S

This should extract the timestamp from newly indexed logs (will not change what is already indexed). It depends on the timestamp being contained within the first 20 characters of the log event.

lukejadamec
Super Champion

When you run a search that pulls the events (without a timestamp) you should see the sourcetype identified at the bottom of each event, and in the list to the left. That is the string you want to use. It will tell Splunk which sourcetype to apply the configuration too.

0 Karma

src053
Engager

I think the content in the square brackets can be discarded. Is the [yoursourcetype] supposed to be the name of the file?

0 Karma

lukejadamec
Super Champion

Yes, Splunk does a smashing job of ingesting timestamps. But, it needs to know what to look for, what do you have in the square brackets?

0 Karma
Get Updates on the Splunk Community!

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

Dive into our sizzling summer lineup for July and August Community Office Hours and Tech Talks. Scroll down to ...

Edge Processor Scaling, Energy & Manufacturing Use Cases, and More New Articles on ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Get More Out of Your Security Practice With a SIEM

Get More Out of Your Security Practice With a SIEMWednesday, July 31, 2024  |  11AM PT / 2PM ETREGISTER ...