Getting Data In

Can inputs.conf be reloaded without restarting splunkd?

katalinali
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

Stephen_Sorkin
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

gbowden_pheaa
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

campbellj1977
Explorer

Will this work with tranforms and props as well?

0 Karma

yoho
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

sdaa
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.

gfrjonp
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

gkanapathy
Splunk Employee
Splunk Employee

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

0 Karma

Stephen_Sorkin
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

skippylou
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.

gkanapathy
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

Register for .conf21 Now! Go Vegas or Go Virtual!

How will you .conf21? You decide! Go in-person in Las Vegas, 10/18-10/21, or go online with .conf21 Virtual, 10/19-10/20.