Getting Data In

Props.conf and time_format, what am I missing

howyagoin
Contributor

I'm missing something, not sure what...I've got some GMT timestamped logs that Splunk didn't magically guess correctly for timezone/date format, so I figured I'd give it a helping hand in props.conf.

My events look like this:

20110825 000702531+0000 hostname01 daemon 13020 1594146607 1594146607 Note;FoobleWibble(50/6) user=name@domain.com:cmd=run :fromhost=1.2.3.4

And I've added the following into props.conf for the directory where the files are located:

[source::/import/logs/files]
MAX_TIMESTAMP_LOOKAHEAD = 25
TIME_FORMAT = %Y%m%d %H%M%S%3N%z

GNU date seems to interpret that correctly, and from the reading I've seen on strptime on linux, this should be right, but it just doesn't seem to get it.

Do I really need a transforms.conf entry for this? Or time_prefix? Since the timestamp is at the start of the line, I was thinking the time_format would be enough.

Am I missing something obvious?

Tags (2)

woodcock
Esteemed Legend

First of all, I would not use source if at all possible; I have always used sourcetype for this. Secondly, your timestamps are 22 characters long, not 25. Try this:

[MySourceType]
MAX_TIMESTAMP_LOOKAHEAD = 22
TIME_FORMAT = %Y%m%d %H%M%S%3N%z

Also, you need to make sure that this is deployed to your indexers, which is where timestamping occurs, not to your forwarder.

0 Karma

howyagoin
Contributor

Yeah:

1   9/8/11 1:35:33.000 PM   20110907 185959292+0000 blah blah 22415 691265462 691265462 Note;blah2
2   9/8/11 1:35:33.000 PM   20110907 185957218+0000 blah blah 22415 691265200 691265200 Note;blah123
3   9/8/11 1:35:33.000 PM   20110907 185956595+0000 blah blah 22415 691265275 691265275 Note;blah123123

From a timechart point of view, everything is timestamped at the moment of reading the file.

Log errors:
AggregatorMiningProcessor - Too many events (400K) with the same timestamp: incrementing timestamps 4 seconds into the future to insure retrievability

0 Karma

hexx
Splunk Employee
Splunk Employee

I would assume that MAX_TIMESTAMP_LOOKAHEAD = 22 should be enough. How is Splunk getting the date wrong, exactly? Could you show us an example?

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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