Monitoring Splunk

Im testing Splunk locally.. Is there a way to have a folder on my desktop that will constantly sync with splunk?

alanxu
Communicator

I want to create a folder on my desktop where I will hold log files for each day. Is there a way when a file is added to the directory it will automatically sync with my splunk database?

Thanks
Alan

EDIT: Got it to work. Thanks for all your help!

Tags (3)
0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

Assuming your Splunk server is running on your local computer, all you need is an inputs.conf entry like this:

[monitor:///path/to/your/folder]
index = your_index
sourcetype = your_sourcetype

Splunk will then constantly index new lines added to files in that folder.

View solution in original post

woodcock
Esteemed Legend

Yes, edit $SPLUNK_HOME/etc/system/local/inputs.conf and add it like this:

[monitor://C:\users\*\desktop\splunkme\*]
index=main
sourcetype=constant_deskctop_sync

alanxu
Communicator

Got it to work.. Thanks

0 Karma

alanxu
Communicator

Where will I be doing this?

0 Karma

woodcock
Esteemed Legend

On your desktop server after you install Splunk there (which I thought you had already done).

martin_mueller
SplunkTrust
SplunkTrust

Assuming your Splunk server is running on your local computer, all you need is an inputs.conf entry like this:

[monitor:///path/to/your/folder]
index = your_index
sourcetype = your_sourcetype

Splunk will then constantly index new lines added to files in that folder.

martin_mueller
SplunkTrust
SplunkTrust

This has an explanation of common keys used: http://docs.splunk.com/Documentation/Splunk/6.2.3/Data/Editinputs.conf

alanxu
Communicator

I got it to work! Thanks

0 Karma

alanxu
Communicator

I found the inputs.config file... Right now all I have is the host = xxxxxxxxxxxxxxxxxx

And then I added your lines...
[monitor:\C:\Users......]
index=??
sourcetype=???

My sourcetype changes and what is index?

0 Karma

alanxu
Communicator

Where will I be doing this?

0 Karma

ChrisG
Splunk Employee
Splunk Employee

If you are new to the configuration file system, definitely read the documentation topics starting with About configuration files in the Admin Manual. You need to understand the directory structure and precedence.

alanxu
Communicator

If Im doing it with Splunk web using localhost where would I find the config files?

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

If you're on Windows, typically C:\Program Files\Splunk\etc.

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...