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
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...