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.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...