【问题标题】:Sentinel configuration file哨兵配置文件
【发布时间】:2016-12-02 02:51:34
【问题描述】:

在向 Sentinel 添加 master 时,我总是通过编辑 sentinel.conf 添加条目,但我经常发现应用程序正在被另一个用户 (Sentinel) 重写。

我想知道是否有更合适和更有效的方式将主机添加到 Sentinel,而无需手动编辑配置文件。

【问题讨论】:

    标签: redis sentinel redis-sentinel


    【解决方案1】:

    您可以配置 sentinel 以在运行时监控新的 master。

    例子:

    SENTINEL MONITOR {cluster_name} {master_ip} {master_port} {quorum}
    SENTINEL SET {cluster_name} auth-pass {password}
    SENTINEL FLUSHCONFIG   # Force Sentinel to rewrite its configuration file
    

    有关更多信息,请查看 Redis Sentinel 文档: https://redis.io/topics/sentinel#reconfiguring-sentinel-at-runtime

    希望有帮助!

    【讨论】:

    • 谢谢,这真的很有帮助!
    猜你喜欢
    • 1970-01-01
    • 2023-03-09
    • 2017-05-25
    • 1970-01-01
    • 1970-01-01
    • 2017-02-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多