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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...