Need some help on configuration of Splunk forwarder.
I have multiple log files under a directory. So, I have pointed the directory to fetch all logs from all file.
Is that correct way?
Now I have one requirement,
Under that directory "Nikks", I have log file named like
Like this I have lot of sets of log files under same directory.
I just want to sent logs from abc.log and xyz.log to splunk.
I don't need events from abc.log.1, abc.log.2 etc.
Please let me know how to configure the forwarder for this scenario.
Thanks in Advance
The inputs documentation has many configuration options you could use, in your case you could:
I would use the whitelist option in your scenario if you are happy with either not hardcoding the sourcetype in the inputs.conf or having a single sourcetype for all the files.
Any of the options listed could work.
Which one of below will work
whitelist=.log$ or whitelist=*.log
one more thing
I have some log file with timestamp as well.
I want to includes these files as well.
What I need is
what i don't want
Please can you provide configuration for this scenario.
I would suggest a website like http://regex101.com could be used for testing any regular expression.
So you could do:
whitelist = \.log(\.\d+/\d+/\d+)?$
Or you could make a blacklist for \.$
The $ matches end of line however *.log would likely work