Getting Data In

Gettin news data by Universal Forwarder

michaelteck
Explorer

Hello everyone, 

I turn to you because I have a little problem. I have an MFT server that generates logs in a directory. In this directory the log files are stored in directories that have the name of the day. And the log files have the name 1000005847456.log. For example, today’s logs 23 April 2024 are stored in the 2024-04-23/ directory.  For now, I have this input.conf file :

[monitor:///data/logs/.../100000*.log]
disabled=false
sourcetype=log4j
host=PC
followTail=0
index=test_wild

 When I launch the Universal Forwarder, it starts listing all files in/data/logs/.../ . And it also starts to send the data in the log directory as of 4 days ago. I am not looking to retrieve the old log data but the log data of today. I don’t understand this behavior of the Universal Forwarder. Could someone help me? 

Labels (2)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @michaelteck ,

if you give to the monitor command a path, Splunk reads all the file in this path.

You can exclude events older than a data (e.g. 1 day ago), adding a parameter to the input stanza

ignoreOlderThan = 1d

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...