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!

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...

Adoption of Infrastructure Monitoring at Splunk

  Splunk's Growth Engineering team showcases one of their first Splunk product adoption-Splunk Infrastructure ...