Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description


etcd-trigger is a long-lived process that sends values from etcd to HTTP end points on change.

It can watch one key and send the value of another, or it can send the value of the key it watches.


   etcd-trigger - sends values from etcd to HTTP end points on change

   etcd-trigger [global options] command [command options] [arguments...]


   help, h      Shows a list of commands or help for one command

   --dns                                DNS server for SRV lookups (default: no SRV lookups) [$DNS]
   --dns-port '53'                      DNS server for SRV lookups (default: 53) [$DNS_PORT]
   --machines ''   comma-separated list of etcd machines [$ETCD_MACHINES]
   --notifies ''  comma-separated list of URLs to notify [$NOTIFIES]
   --read                               etcd key whose value to send to notify URLs (default: same as --trigger) [$READ]
   --retrigger                          etcd key to write after notifications (default: no retrigger) [$RETRIGGER]
   --trigger                            etcd key to watch (required) [$TRIGGER]
   --help, -h                           show help
   --version, -v                        print the version

The value of the etcd key named by $READ (or by $TRIGGER if not given)
is submitted as the body of an HTTP PUT to each URL in $NOTIFIES when the etcd modifiedIndex of $TRIGGER changes.

If $DNS is specified, it is used to perform SRV lookups for hostnames in URLs that have no port specifier.

If $RETRIGGER is specified, etcd-trigger will write the value received from $TRIGGER to the key named by $RETRIGGER on success.
This allows multiple triggers to be chained.

If any notification is unsuccessful (either because of a network failure or an HTTP response that does not start with 2),
any subsequent notifications and retrigger are not attempted for the current change. This does not prevent etcd-trigger from
continuing to watch the trigger and try again on next change.


The following docker process is used to apply redis master/slave topology changes, looking up notify services using SRV records
from SkyDNS on a CoreOS cluster:

docker run -d \
    -e DNS= \
    -e MACHINES=,, \
    -e NOTIFIES=http://redis-1-dictator.docker/master,http://redis-1-dnsd.docker/dns \
    -e TRIGGER=/config/redis-1/topology-trigger \
    -e READ=/config/redis-1/topology \
Docker Pull Command
Source Repository