Getting Data In

setting the timestamp from source file name instead of the date in the events

imrago
Contributor

I have log files with file names like:

report-2012-02-25.csv
report-2012-02-26.csv

In those reports only some events have a date field.

How could I force Splunk to use the date extracted from the file name instead of the dates recognized in the events for all of them?

Tags (1)
1 Solution

imrago
Contributor

Thank you for that, but found another problem. Time field is needed to be present in the events based on the documentation:

  1. If no events in a source have a date, Splunk tries to find one in the source name or file name. (This requires that the events have a time, even though they don't have a date.)
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...