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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...