Getting Data In

Deployment Server - reload configs without restarting splunk

tollops
Explorer

Hi;

We are currently setting up multiple new forwarders, which are getting their configs from the deployment server.

Everytime, we setup a new app or modify an existing app we are having to restart splunk.

Is there an easier way to re-initialise the Deployment Server to refresh the /opt/splunk/var/run/tmp/ sub-folders without having to do a "service restart splunk"

Trevor..

iamarkaprabha
Contributor

Yes , You can create a server class for restart . Add the restart app and clients for it.
It will work like smooth

0 Karma

dominiquevocat
Motivator

You might want to look at https://splunkbase.splunk.com/app/2775/
it has a relod deploy server as well as restart forwarder feature.

0 Karma

mlconnor
Explorer

If you are getting this error

An error occurred: Could not create Splunk settings directory at '/root/.splunk'

Then make sure you run the process as the user you typically run splunk from. splunk in my case.

sudo su splunk
[splunk@servername5001 /opt/splunk/etc](603)
$ /opt/splunk/bin/splunk reload deploy-server
Your session is invalid.  Please login.
Splunk username: admin
Password: 
Login successful, running command...
Reloading serverclass(es).
[splunk@servername /opt/splunk/etc](604)

kskujawa
Explorer

I have a dummy app that I push when I want to make changes. Just add that app and next check in all updated apps get pushed.

0 Karma

lukejadamec
Super Champion

Great, help out and accept the right answer or post a better one.

0 Karma

tollops
Explorer

Bingo. We have success.
Thanks Peoples.. 🙂

joshd
SplunkTrust
SplunkTrust

Should be able to reload the configs by accessing http://yoursplunkinstance/en-US/debug/refresh

0 Karma

kristian_kolb
Ultra Champion

that takes longer time, and it reloads a bunch of other stuff. I think it's generally better suited for reloading props/transforms stuff that would normally require a restart.

0 Karma

tyronetv
Communicator

According to http://wiki.splunk.com/Deploy:DeploymentServer it is $SPLUNK_HOME/bin/splunk reload deploy-server

There is other information there but I think that answers you question.

matthewpearce
Explorer

For larger deployments, I think it's better to use the -class switch
${SPLUNK_HOME}/bin/splunk reload deploy-server -class

Tags (1)

rahulkumar02
Engager

This helped me a lot. Thank You!

Tags (1)
0 Karma

lukejadamec
Super Champion

Big fan of reload deploy-server myself.

ben_leung
Builder

Can anyone second that this is the endpoint for the command?

/services/deployment/client/config/reload -X POST

0 Karma
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.