Getting Data In

Splunk Not Recognizing Timestamps – What Settings Should I Use?

splunk_user_99
Explorer

Hello everyone,

 

I’m having trouble getting Splunk to recognize timestamps correctly, and I hope someone can help me out. I’m importing an access log file, where the timestamps are formatted like this:

 

[01/Jan/2017:02:16:51 -0800]

here also a live output:

81341BD6-AE01-4FF1-99EA-6C755D6680AD.png

However, Splunk is not recognizing these timestamps and instead assigns the indexing time.

 

I have tried adjusting the settings in the sourcetype configuration (see screenshot) and have set the following values:

Timestamp format: %d/%b/%Y:%H:%M:%S %z

Timestamp prefix: \[

Lookahead: 32

 

Unfortunately, the timestamps are still not recognized correctly.

👉 Do I need to modify props.conf or inputs.conf as well?

👉 Is my timestamp format correct, or should it be defined differently?

👉 Could there be another issue in my extraction settings?

 

The log file looks like this:

IMG_1085.jpeg

Should I maybe change the log file with some scripting in order to change the format?

 

I would really appreciate any guidance! Thank you in advance. 😊

 

Best regards

Labels (3)
0 Karma
1 Solution

livehybrid
SplunkTrust
SplunkTrust

It looks like your time extraction settings are corrrect, however you need to add MAX_DAYS_AGO to be a higher value (eg 3000) for Splunk to accept that 2017 timestamp as the default is 2000 and therefore Splunk is not accepting the date.

Let me know if adding MAX_DAYS_AGO=3000 to your extraction config works!

Good luck

Will

View solution in original post

livehybrid
SplunkTrust
SplunkTrust

It looks like your time extraction settings are corrrect, however you need to add MAX_DAYS_AGO to be a higher value (eg 3000) for Splunk to accept that 2017 timestamp as the default is 2000 and therefore Splunk is not accepting the date.

Let me know if adding MAX_DAYS_AGO=3000 to your extraction config works!

Good luck

Will

splunk_user_99
Explorer

Hey Will,

I just wanted to say a huge THANK YOU for your help! 🙌

Your suggestion to increase MAX_DAYS_AGO to 3000 completely solved my issue, and Splunk now correctly recognizes my timestamps.

Honestly, I had been struggling with this for quite some time, and your solution saved me a lot of time and frustration. I really appreciate the effort you put into answering my question.

 

Thanks again, and have a great day! 🚀

 

Best,

Emil

0 Karma
Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Dynamic formatting from XML events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

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