Getting Data In

logfile folder

vaibhavbeohar
Path Finder

Hi,

I am having a logfile folder in which every day log file got created with the date name i want to index only latest 2 day's log file into splunk. what will be the configuration i have to make in my splunk universal forwarder (inputs.conf).

Please suggest.

Thanks.

0 Karma

dmaislin_splunk
Splunk Employee
Splunk Employee

http://docs.splunk.com/Documentation/Splunk/latest/admin/inputsconf

In the inputs.conf use this:

ignoreOlderThan = <time window>
* Causes the monitored input to stop checking files for updates if their modtime has passed this threshold.
  This improves the speed of file tracking operations when monitoring directory hierarchies with large numbers
  of historical files (for example, when active log files are colocated with old files that are no longer
  being written to).
  * As a result, do not select a cutoff that could ever occur for a file
    you wish to index.  Take downtime into account!  
    Suggested value: 14d , which means 2 weeks
* A file whose modtime falls outside this time window when seen for the first time will not be indexed at all.
* Value must be: <number><unit> (e.g., 7d is one week).  Valid units are d (days), m (minutes), and s (seconds).
* Default: disabled.
0 Karma

vaibhavbeohar
Path Finder

Hi Team,

Any Suggestion ???

0 Karma
Get Updates on the Splunk Community!

How to Monitor Google Kubernetes Engine (GKE)

We’ve looked at how to integrate Kubernetes environments with Splunk Observability Cloud, but what about ...

Index This | How can you make 45 using only 4?

October 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...

Splunk Education Goes to Washington | Splunk GovSummit 2024

If you’re in the Washington, D.C. area, this is your opportunity to take your career and Splunk skills to the ...