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!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...