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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...