What to restart after a change


#1

I can’t seem to find an answer to this question in the docs …

After I change/remove/add a check, which Sensu services need to be restarted? (client | server | api | dashboard) (Is there some other means of having the app reread the config files?)

Same question for a handler.

Regards,
Mojo


#2

The way I would answer this question is by looking at the puppet code,
as I happen to use the puppet module (and I let it figure this out for
me) Hurray for config management!

Check: https://github.com/sensu/sensu-puppet/blob/master/manifests/check.pp#L90
Handler: https://github.com/sensu/sensu-puppet/blob/master/manifests/handler.pp#L92
api: https://github.com/sensu/sensu-puppet/blob/master/manifests/api/service.pp#L27
dashboard: https://github.com/sensu/sensu-puppet/blob/master/manifests/dashboard/service.pp#L27
server: https://github.com/sensu/sensu-puppet/blob/master/manifests/server/service.pp#L27
client: https://github.com/sensu/sensu-puppet/blob/master/manifests/client/service.pp#L28

So, sortof. sensu-client has to be restarted to pick up new checks if
they are defined on the client. (standalone, and safe-mode)
sensu-server needs to be restarted if the check is defined server side
with subscribers. (and safe mode off)

Handlers, the server must be restarted.

If you wanted to verify this in the code, you would have to see which
component reads which settings:
For example in api:
https://github.com/sensu/sensu/blob/master/lib/sensu/api.rb#L29,#L57
Reads api, redis, and rabbitmq configs. (on start)

I'm not aware of an alternate way to reload configs besides restarting.

The docs are not super explicit, but it does say for adding a check on
the server to restart the server+client:
http://sensuapp.org/docs/0.12/adding_a_check (Testing the check)

And standalone checks to restart the client:
http://sensuapp.org/docs/0.12/adding_a_standalone_check (Testing the check)

For handlers it says to restart the server:
http://sensuapp.org/docs/0.12/adding_a_handler (last line)

···

On Fri, Jan 17, 2014 at 1:28 PM, Morris Jones <mojo.la@gmail.com> wrote:

I can't seem to find an answer to this question in the docs ...

After I change/remove/add a check, which Sensu services need to be
restarted? (client | server | api | dashboard) (Is there some other means of
having the app reread the config files?)

Same question for a handler.

Regards,
Mojo


#3