Getting Data In

Can inputs.conf be reloaded without restarting splunkd?

Path Finder

As splunk can't handle large number of files (e.g. thousands of files) at the same time, I use shell script to modify the whitelist in inputs.conf. Will splunk reload the configuration setting after a period of time without restarting?

Tags (3)
1 Solution

Splunk Employee
Splunk Employee

Splunk 4.1 should be easily able to handle hundreds of thousands of files, as long as only thousands of files are changing at the same time.

You can cause Splunk to reread its file input configuration by POSTing to https://splunk-server:8089/services/data/inputs/monitor/_reload.

For example:

wget https://localhost:8089/services/data/inputs/monitor/_reload --post-data '' --no-check-certificate --user admin --password changeme -O -

View solution in original post

Path Finder

For many cases the extracts in the props.conf can be reloaded by appending the following to a search -

| extract reload=true

This may work for transforms, if there is only a change to an existing setting, You would probably need to restart if you create a new setting in transforms.conf . Then again, it might not. I have had mixed results with many of these "on the fly" efforts. It is safest to restart.

0 Karma

Explorer

Will this work with tranforms and props as well?

0 Karma

Contributor

I believe the supported way is by doing a full restart. For some specific configuration changes in inputs.conf, a simple reload may not be sufficient. But Sorkin's answer will be very useful for me !

0 Karma

Explorer

You could use splunk _internal call for this, instead of wget:

./splunk _internal call /services/data/inputs/monitor/_reload -auth admin:changeme

But I have not succeded to reload inputs.conf with this or with wget.

Explorer

^ Also correct. I prefer the above as I don't have to hard code the pw when running from cli.

./splunk _internal call /services/data/inputs/monitor/_reload -auth

Will prompt you for Username: & Password: so you do not have to list them in your bash_history

Splunk Employee
Splunk Employee

Splunk 4.1+ can handle at least a few hundreds of thousands of files

0 Karma

Splunk Employee
Splunk Employee

Splunk 4.1 should be easily able to handle hundreds of thousands of files, as long as only thousands of files are changing at the same time.

You can cause Splunk to reread its file input configuration by POSTing to https://splunk-server:8089/services/data/inputs/monitor/_reload.

For example:

wget https://localhost:8089/services/data/inputs/monitor/_reload --post-data '' --no-check-certificate --user admin --password changeme -O -

View solution in original post

Communicator

A restart is required.

See: http://www.splunk.com/base/Documentation/latest/Admin/Inputsconf

This section:

# There is an inputs.conf in $SPLUNK_HOME/etc/system/default/.  To set custom configurations, 
# place an inputs.conf in $SPLUNK_HOME/etc/system/local/.  For examples, see inputs.conf.example.
# You must restart Splunk to enable new configurations.

Splunk Employee
Splunk Employee

The docs comments are actually incorrect. It is possible to reload inputs.conf without a restart. See Stephen Sorkin's answer