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!

Building Reliable Asset and Identity Frameworks in Splunk ES

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

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...