Getting Data In

Extract timestamp from the date-time of the log file

laristote
Explorer

Hi,
I have some log files with no timestamp neither in the indexed data nor in the path or filename.
I don't want to use the current time.

Is there a way to use the date and time of the file as the timestamp?

Thanks

Tags (1)
0 Karma
1 Solution

tom_frotscher
Builder

As you can see here: link

Splunk prefers the Files modification time (5.) over the current timestamp (6.). So this should happen automatically, if splunk can not find an other timestamp from (1.) to (4.).

Greetings

Tom

View solution in original post

0 Karma

tom_frotscher
Builder

As you can see here: link

Splunk prefers the Files modification time (5.) over the current timestamp (6.). So this should happen automatically, if splunk can not find an other timestamp from (1.) to (4.).

Greetings

Tom

0 Karma

laristote
Explorer

You're right, it's working.
Strangely, it is not working in the data preview from Add Data / upload while it's working in Add Data / monitor.

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...