Splunk Search

Can Splunk index the complete folder? If yes, how can we achieve this?

kratikaj07
Explorer

Can Splunk index the complete folder? If yes, how can we achieve this?

Tags (1)
0 Karma
1 Solution

strive
Influencer

from splunk documentation of inputs.conf file

[monitor://<path>]  
* This directs Splunk to watch all files in <path>.   
* <path> can be an entire directory or just a single file.  
* You must specify the input type and then the path, so put three slashes in your path if you are starting   
at the root (to include the slash that goes before the root directory).

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

View solution in original post

strive
Influencer

from splunk documentation of inputs.conf file

[monitor://<path>]  
* This directs Splunk to watch all files in <path>.   
* <path> can be an entire directory or just a single file.  
* You must specify the input type and then the path, so put three slashes in your path if you are starting   
at the root (to include the slash that goes before the root directory).

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

kratikaj07
Explorer

Thanks.It works with "Skip Preview" option.

0 Karma

strive
Influencer

Can you Skip Preview and try. Choose Skip Preview option and index files.
I have indexed archive files and it works.

Splunk Enterprise decompresses archive files before it indexes them. It can handle these common archive file types: tar, gz, bz2, tar.gz, tgz, tbz, tbz2, zip, and z.
If you add new data to an existing archive file, Splunk Enterprise will re-index the entire file, not just the new data in the file. This can result in duplication of events.

See this link: http://docs.splunk.com/Documentation/Splunk/6.1.2/Data/MonitorFilesAndDirectories

kratikaj07
Explorer

I am getting error when I am uploading zip file like this:

Unable to process the file : Cannot preview archive file.

0 Karma

strive
Influencer

Using splunk web you can upload zip file containing your log files.
Splunk Enterprise recognizes the following archive filetypes: tar, gz, bz2, tar.gz, tgz, tbz, tbz2, zip, and z

kratikaj07
Explorer

Ok..Thanks for the quick response..I have one more question is it possible using Splunk Web?

0 Karma

strive
Influencer

You can use [batch://] for large archives of historic data. See, BATCH ("Upload a file" in Splunk Web): section.

0 Karma

kratikaj07
Explorer

Yes..I mean to say all log file present in a folder so instead of going and uploading each file.Is there any way to index complete folder in one shot?

0 Karma

strive
Influencer

do you mean all the log files present in a folder?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...