Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 151 lines (138 sloc) 5.755 kB
5b5eb19 @antirez Typo.
authored
1 # Example sentinel.conf
120ba39 @antirez First implementation of Redis Sentinel.
authored
2
fcc8bf9 @mrb Some cleanup in sentinel.conf
mrb authored
3 # port <sentinel-port>
4 # The port that this sentinel instance will run on
5 port 26379
6
999fe0d @antirez Sentinel: ability to execute notification scripts.
authored
7 # sentinel monitor <master-name> <ip> <redis-port> <quorum>
8 #
fcc8bf9 @mrb Some cleanup in sentinel.conf
mrb authored
9 # Tells Sentinel to monitor this slave, and to consider it in O_DOWN
10 # (Objectively Down) state only if at least <quorum> sentinels agree.
120ba39 @antirez First implementation of Redis Sentinel.
authored
11 #
12 # Note: master name should not include special characters or spaces.
13 # The valid charset is A-z 0-9 and the three characters ".-_".
14 sentinel monitor mymaster 127.0.0.1 6379 2
15
dfb7194 @antirez Sentinel: Support for AUTH.
authored
16 # sentinel auth-pass <master-name> <password>
17 #
18 # Set the password to use to authenticate with the master and slaves.
19 # Useful if there is a password set in the Redis instances to monitor.
20 #
21 # Note that the master password is also used for slaves, so it is not
22 # possible to set a different password in masters and slaves instances
23 # if you want to be able to monitor these instances with Sentinel.
24 #
25 # However you can have Redis instances without the authentication enabled
26 # mixed with Redis instances requiring the authentication (as long as the
27 # password set is the same for all the instances requiring the password) as
28 # the AUTH command will have no effect in Redis instances with authentication
29 # switched off.
30 #
31 # Example:
32 #
33 # sentinel auth-pass mymaster MySUPER--secret-0123passw0rd
34
999fe0d @antirez Sentinel: ability to execute notification scripts.
authored
35 # sentinel down-after-milliseconds <master-name> <milliseconds>
36 #
120ba39 @antirez First implementation of Redis Sentinel.
authored
37 # Number of milliseconds the master (or any attached slave or sentinel) should
38 # be unreachable (as in, not acceptable reply to PING, continuously, for the
39 # specified period) in order to consider it in S_DOWN state (Subjectively
40 # Down).
41 #
42 # Default is 30 seconds.
43 sentinel down-after-milliseconds mymaster 30000
44
999fe0d @antirez Sentinel: ability to execute notification scripts.
authored
45 # sentinel can-failover <master-name> <yes|no>
46 #
120ba39 @antirez First implementation of Redis Sentinel.
authored
47 # Specify if this Sentinel can start the failover for this master.
48 sentinel can-failover mymaster yes
49
999fe0d @antirez Sentinel: ability to execute notification scripts.
authored
50 # sentinel parallel-syncs <master-name> <numslaves>
51 #
120ba39 @antirez First implementation of Redis Sentinel.
authored
52 # How many slaves we can reconfigure to point to the new slave simultaneously
53 # during the failover. Use a low number if you use the slaves to serve query
54 # to avoid that all the slaves will be unreachable at about the same
55 # time while performing the synchronization with the master.
56 sentinel parallel-syncs mymaster 1
57
999fe0d @antirez Sentinel: ability to execute notification scripts.
authored
58 # sentinel failover-timeout <master-name> <milliseconds>
59 #
120ba39 @antirez First implementation of Redis Sentinel.
authored
60 # Specifies the failover timeout in milliseconds. When this time has elapsed
61 # without any progress in the failover process, it is considered concluded by
62 # the sentinel even if not all the attached slaves were correctly configured
63 # to replicate with the new master (however a "best effort" SLAVEOF command
64 # is sent to all the slaves before).
65 #
66 # Also when 25% of this time has elapsed without any advancement, and there
67 # is a leader switch (the sentinel did not started the failover but is now
68 # elected as leader), the sentinel will continue the failover doing a
69 # "takeover".
70 #
71 # Default is 15 minutes.
72 sentinel failover-timeout mymaster 900000
73
560e049 @guiquanz Fixed many typos.
guiquanz authored
74 # SCRIPTS EXECUTION
7c9bfe1 @antirez Sentinel: sentinel.conf self-documenation improved.
authored
75 #
76 # sentinel notification-script and sentinel reconfig-script are used in order
77 # to configure scripts that are called to notify the system administrator
78 # or to reconfigure clients after a failover. The scripts are executed
79 # with the following rules for error handling:
80 #
81 # If script exists with "1" the execution is retried later (up to a maximum
82 # number of times currently set to 10).
83 #
84 # If script exists with "2" (or an higher value) the script execution is
85 # not retried.
86 #
87 # If script terminates because it receives a signal the behavior is the same
88 # as exit code 1.
89 #
90 # A script has a maximum running time of 60 seconds. After this limit is
91 # reached the script is terminated with a SIGKILL and the execution retried.
92
93 # NOTIFICATION SCRIPT
94 #
999fe0d @antirez Sentinel: ability to execute notification scripts.
authored
95 # sentinel notification-script <master-name> <script-path>
96 #
97 # Call the specified notification script for any sentienl event that is
98 # generated in the WARNING level (for instance -sdown, -odown, and so forth).
99 # This script should notify the system administrator via email, SMS, or any
100 # other messaging system, that there is something wrong with the monitored
101 # Redis systems.
102 #
103 # The script is called with just two arguments: the first is the event type
104 # and the second the event description.
105 #
af41f6c @jzawodn comment fix
jzawodn authored
106 # The script must exist and be executable in order for sentinel to start if
999fe0d @antirez Sentinel: ability to execute notification scripts.
authored
107 # this option is provided.
108 #
109 # Example:
110 #
111 # sentinel notification-script mymaster /var/redis/notify.sh
112
26a3400 @antirez Sentinel: client reconfiguration script execution.
authored
113 # CLIENTS RECONFIGURATION SCRIPT
114 #
115 # sentinel client-reconfig-script <master-name> <script-path>
116 #
117 # When the failover starts, ends, or is aborted, a script can be called in
118 # order to perform application-specific tasks to notify the clients that the
119 # configuration has changed and the master is at a different address.
120 #
121 # The script is called in the following cases:
122 #
123 # Failover started (a slave is already promoted)
124 # Failover finished (all the additional slaves already reconfigured)
125 # Failover aborted (in that case the script was previously called when the
126 # failover started, and now gets called again with swapped
127 # addresses).
128 #
129 # The following arguments are passed to the script:
130 #
131 # <master-name> <role> <state> <from-ip> <from-port> <to-ip> <to-port>
132 #
133 # <state> is "start", "end" or "abort"
134 # <role> is either "leader" or "observer"
135 #
136 # The arguments from-ip, from-port, to-ip, to-port are used to communicate
137 # the old address of the master and the new address of the elected slave
138 # (now a master) in the case state is "start" or "end".
139 #
140 # For abort instead the "from" is the address of the promoted slave and
141 # "to" is the address of the original master address, since the failover
142 # was aborted.
143 #
144 # This script should be resistant to multiple invocations.
145 #
146 # Example:
147 #
148 # sentinel client-reconfig-script mymaster /var/redis/reconfig.sh
149
999fe0d @antirez Sentinel: ability to execute notification scripts.
authored
150
Something went wrong with that request. Please try again.