Getting Data In

Some logs have timestamps in filename, some don't, combine into 1

derekslenk
New Member

Hello,

We are having problems with logging a certain file pattern, which is coming from Sitecore (shouldn't matter).

The first time in the day that the service is restarted/recycled, it creates a file like: log.20170502.txt

However, on subsequent restarts, it creates log files with timestamps, like: log.20170502.085920.txt

Is there any way to set up the forwarder to make it look like to the search heads/indexers that it all comes from log.txt?

Thanks in advanced.

0 Karma

DalJeanis
Legend

If each of those log files carries distinct data, then just set up your regex to catch all of them, with something like this...

log\.(\d+\.){0,2}txt

or

log\.\d+\.\d+?\.?txt
0 Karma

derekslenk
New Member

But what we are trying to do is have it show up as just log.txt in the search head, just for easing searching among files.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

What Is Splunk? Here’s What You Can Do with Splunk

Hey Splunk Community, we know you know Splunk. You likely leverage its unparalleled ability to ingest, index, ...

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...