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!

What the End of Support for Splunk Add-on Builder Means for You

Hello Splunk Community! We want to share an important update regarding the future of the Splunk Add-on Builder ...

Solve, Learn, Repeat: New Puzzle Channel Now Live

Welcome to the Splunk Puzzle PlaygroundIf you are anything like me, you love to solve problems, and what ...

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...