In order to let checks appear in Uchiwa when a new sensu-client is added, the sensu-server
and sensu-api
need to be restarted. At the moment there are 5 clients and one server. Everytime a new sensu-client is added using ansible the checks do not appear in Uchiwa. At the moment, I need to login to the sensu-server and restart the services. How to automate this using ansible?
According to this documentation there are handlers:
handlers:
- name: restart memcached
service: name=memcached state=restarted
listen: "restart web services"
- name: restart apache
service: name=apache state=restarted
listen: "restart web services"
that could be called using notify:
tasks:
- name: restart everything
command: echo "this task will restart the web services"
notify: "restart web services"
so that the service will be restarted if a change occurs in for example the config, but how to notify a remote service, e.g. notify service on IP-B from IP-A?