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!

Announcing Scheduled Export GA for Dashboard Studio

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

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...