-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ballooninmyhand
committed
Apr 6, 2020
1 parent
31c5b11
commit f24f85b
Showing
11 changed files
with
132 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Sentinel.conf | ||
|
||
# 端口号 | ||
port 26379 | ||
|
||
# 配置哨兵的监控参数 | ||
# 格式:sentinel monitor <mastername> <masterip> <masterport> <quorum> | ||
# mastername 是为这个被监控的 master 起的名字 | ||
# masterip 是被监控的 master 的 IP 或主机名。因为 Docker 容器之间可以使用容器名访问,所以这里写 master 节点的容器名 | ||
# masterport 是被监控节点所监听的端口号 | ||
# quorom 设定了当几个哨兵判定这个节点失效后,才认为这个节点真的失效了 | ||
sentinel myid f84599e4178829e48714ca7a1418db972414b34c | ||
|
||
# 连接主节点的密码 | ||
# 格式:sentinel auth-pass <master-name> <password> | ||
# sentinel auth-pass 172.20.0.7 redis | ||
|
||
# master 在连续多长时间无法响应 PING 指令后,就会主观判定节点下线,默认是 30s | ||
# 格式:sentinel down-after-milliseconds <mastername> <milliseconds> | ||
sentinel deny-scripts-reconfig yes | ||
|
||
# 日志文件 | ||
logfile "/var/log/redis/sentinel.log" | ||
|
||
# Generated by CONFIG REWRITE | ||
dir "/data" | ||
sentinel monitor redis-master 172.20.0.8 6379 2 | ||
sentinel down-after-milliseconds redis-master 20000 | ||
sentinel config-epoch redis-master 1 | ||
sentinel leader-epoch redis-master 1 | ||
sentinel known-replica redis-master 172.20.0.4 6379 | ||
sentinel known-replica redis-master 172.20.0.9 6379 | ||
sentinel known-sentinel redis-master 172.20.0.8 26379 3af4477184a27c5cd2b8cffe777305a3e84253a3 | ||
sentinel known-sentinel redis-master 172.20.0.9 26379 bbc97991cae04a23433d114fb5550212b8c511f8 | ||
sentinel current-epoch 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Sentinel.conf | ||
|
||
# 端口号 | ||
port 26379 | ||
|
||
# 配置哨兵的监控参数 | ||
# 格式:sentinel monitor <mastername> <masterip> <masterport> <quorum> | ||
# mastername 是为这个被监控的 master 起的名字 | ||
# masterip 是被监控的 master 的 IP 或主机名。因为 Docker 容器之间可以使用容器名访问,所以这里写 master 节点的容器名 | ||
# masterport 是被监控节点所监听的端口号 | ||
# quorom 设定了当几个哨兵判定这个节点失效后,才认为这个节点真的失效了 | ||
sentinel myid 3af4477184a27c5cd2b8cffe777305a3e84253a3 | ||
|
||
# 连接主节点的密码 | ||
# 格式:sentinel auth-pass <master-name> <password> | ||
# sentinel auth-pass 172.20.0.7 redis | ||
|
||
# master 在连续多长时间无法响应 PING 指令后,就会主观判定节点下线,默认是 30s | ||
# 格式:sentinel down-after-milliseconds <mastername> <milliseconds> | ||
sentinel deny-scripts-reconfig yes | ||
|
||
# 日志文件 | ||
logfile "/var/log/redis/sentinel.log" | ||
|
||
# Generated by CONFIG REWRITE | ||
dir "/data" | ||
sentinel monitor redis-master 172.20.0.8 6379 2 | ||
sentinel down-after-milliseconds redis-master 20000 | ||
sentinel config-epoch redis-master 1 | ||
sentinel leader-epoch redis-master 1 | ||
sentinel known-replica redis-master 172.20.0.4 6379 | ||
sentinel known-replica redis-master 172.20.0.9 6379 | ||
sentinel known-sentinel redis-master 172.20.0.9 26379 bbc97991cae04a23433d114fb5550212b8c511f8 | ||
sentinel known-sentinel redis-master 172.20.0.4 26379 f84599e4178829e48714ca7a1418db972414b34c | ||
sentinel current-epoch 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Sentinel.conf | ||
|
||
# 端口号 | ||
port 26379 | ||
|
||
# 配置哨兵的监控参数 | ||
# 格式:sentinel monitor <mastername> <masterip> <masterport> <quorum> | ||
# mastername 是为这个被监控的 master 起的名字 | ||
# masterip 是被监控的 master 的 IP 或主机名。因为 Docker 容器之间可以使用容器名访问,所以这里写 master 节点的容器名 | ||
# masterport 是被监控节点所监听的端口号 | ||
# quorom 设定了当几个哨兵判定这个节点失效后,才认为这个节点真的失效了 | ||
sentinel myid bbc97991cae04a23433d114fb5550212b8c511f8 | ||
|
||
# 连接主节点的密码 | ||
# 格式:sentinel auth-pass <master-name> <password> | ||
# sentinel auth-pass 172.20.0.7 redis | ||
|
||
# master 在连续多长时间无法响应 PING 指令后,就会主观判定节点下线,默认是 30s | ||
# 格式:sentinel down-after-milliseconds <mastername> <milliseconds> | ||
sentinel deny-scripts-reconfig yes | ||
|
||
# 日志文件 | ||
logfile "/var/log/redis/sentinel.log" | ||
|
||
# Generated by CONFIG REWRITE | ||
dir "/data" | ||
sentinel monitor redis-master 172.20.0.8 6379 2 | ||
sentinel down-after-milliseconds redis-master 20000 | ||
sentinel config-epoch redis-master 1 | ||
sentinel leader-epoch redis-master 1 | ||
sentinel known-replica redis-master 172.20.0.4 6379 | ||
sentinel known-replica redis-master 172.20.0.9 6379 | ||
sentinel known-sentinel redis-master 172.20.0.8 26379 3af4477184a27c5cd2b8cffe777305a3e84253a3 | ||
sentinel known-sentinel redis-master 172.20.0.4 26379 f84599e4178829e48714ca7a1418db972414b34c | ||
sentinel current-epoch 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters