]> git.saurik.com Git - redis.git/blame - sentinel.conf
Sentinel: abort failover when in wait-start if master is back.
[redis.git] / sentinel.conf
CommitLineData
be2be3d9 1# Example sentinel.conf
6b5daa2d 2
23023fc6 3# port <sentinel-port>
4# The port that this sentinel instance will run on
5port 26379
6
baace5fc 7# sentinel monitor <master-name> <ip> <redis-port> <quorum>
8#
23023fc6 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.
6b5daa2d 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 ".-_".
14sentinel monitor mymaster 127.0.0.1 6379 2
15
baace5fc 16# sentinel down-after-milliseconds <master-name> <milliseconds>
17#
6b5daa2d 18# Number of milliseconds the master (or any attached slave or sentinel) should
19# be unreachable (as in, not acceptable reply to PING, continuously, for the
20# specified period) in order to consider it in S_DOWN state (Subjectively
21# Down).
22#
23# Default is 30 seconds.
24sentinel down-after-milliseconds mymaster 30000
25
baace5fc 26# sentinel can-failover <master-name> <yes|no>
27#
6b5daa2d 28# Specify if this Sentinel can start the failover for this master.
29sentinel can-failover mymaster yes
30
baace5fc 31# sentinel parallel-syncs <master-name> <numslaves>
32#
6b5daa2d 33# How many slaves we can reconfigure to point to the new slave simultaneously
34# during the failover. Use a low number if you use the slaves to serve query
35# to avoid that all the slaves will be unreachable at about the same
36# time while performing the synchronization with the master.
37sentinel parallel-syncs mymaster 1
38
baace5fc 39# sentinel failover-timeout <master-name> <milliseconds>
40#
6b5daa2d 41# Specifies the failover timeout in milliseconds. When this time has elapsed
42# without any progress in the failover process, it is considered concluded by
43# the sentinel even if not all the attached slaves were correctly configured
44# to replicate with the new master (however a "best effort" SLAVEOF command
45# is sent to all the slaves before).
46#
47# Also when 25% of this time has elapsed without any advancement, and there
48# is a leader switch (the sentinel did not started the failover but is now
49# elected as leader), the sentinel will continue the failover doing a
50# "takeover".
51#
52# Default is 15 minutes.
53sentinel failover-timeout mymaster 900000
54
baace5fc 55# sentinel notification-script <master-name> <script-path>
56#
57# Call the specified notification script for any sentienl event that is
58# generated in the WARNING level (for instance -sdown, -odown, and so forth).
59# This script should notify the system administrator via email, SMS, or any
60# other messaging system, that there is something wrong with the monitored
61# Redis systems.
62#
63# The script is called with just two arguments: the first is the event type
64# and the second the event description.
65#
78b606ac 66# The script must exist and be executable in order for sentinel to start if
baace5fc 67# this option is provided.
68#
69# Example:
70#
71# sentinel notification-script mymaster /var/redis/notify.sh
72
73