Event Handlers - Serf

SERF Download Github Intro Docs Community What is Serf? Use Cases Serf vs. Other Software ZooKeeper, doozerd, etcd Chef, Puppet, etc. Fabric Consul Custom Solutions Getting Started Install Serf Run the Agent Join a Cluster Event Handlers Custom User Events Custom Queries Next Steps We've now seen how to start Serf agents and join them into a cluster. While this is cool to see on its own, the true power and utility of Serf is being able to react to membership changes and other events that Serf invokes. By specifying event handlers , Serf will invoke custom scripts whenever an event is received. To start, let's create our first event handler. Create a shell script named handler.sh with the following contents and make sure that it is set to be executable ( chmod +x handler.sh ). #!/bin/bash echo echo "New event: ${SERF_EVENT}. Data...

Linked on 2014-06-09 19:41:35 | Similar Links