redisredis-sentinel

How to get a Redis sentinel to forget a master?


I'm having no end of issues with my Redis instances - masters, slaves (old install) and sentinels. Part of the issue is that my Redis Masters and Slave are running a windows 3.0.2 version I can not do anything about. I also do not have access to the root or redis accounts on the unix box where the sentinels are running.

I can connect to the sentinels using the redis-cli.

How do I get one of my Sentinels to forget a master? I've managed to get it to monitor a second master using the monitor command but can find no way to get it to forget it.

I can't edit the config file as I don't have permission.

I also can't find a list of available sentinel commands for the cli. Things like config get don't appear to work. If someone can point me at a link that would be fantastic!


Solution

  • I found the commands in the sentinel.c:

    "MASTERS -- Show a list of monitored masters and their state.",
    "MASTER <master-name> -- Show the state and info of the specified master.",
    "REPLICAS <master-name> -- Show a list of replicas for this master and their state.",
    "SENTINELS <master-name> -- Show a list of Sentinel instances for this master and their state.",
    "IS-MASTER-DOWN-BY-ADDR <ip> <port> <current-epoch> <runid> -- Check if the master specified by ip:port is down from current Sentinel's point of view.",
    "GET-MASTER-ADDR-BY-NAME <master-name> -- Return the ip and port number of the master with that name.",
    "RESET <pattern> -- Reset masters for specific master name matching this pattern.",
    "FAILOVER <master-name> -- Manually failover a master node without asking for agreement from other Sentinels",
    "PENDING-SCRIPTS -- Get pending scripts information.", 
    "MONITOR <name> <ip> <port> <quorum> -- Start monitoring a new master with the specified name, ip, port and quorum.",
    "FLUSHCONFIG -- Force Sentinel to rewrite its configuration on disk, including the current Sentinel state.",
    "REMOVE <master-name> -- Remove master from Sentinel's monitor list.",
    "CKQUORUM <master-name> -- Check if the current Sentinel configuration is able to reach the quorum needed to failover a master "
    "and the majority needed to authorize the failover.",
    "SET <master-name> <option> <value> -- Set configuration paramters for certain masters.",
    "INFO-CACHE <master-name> -- Return last cached INFO output from masters and all its replicas.",
    "SIMULATE-FAILURE (crash-after-election|crash-after-promotion|help) -- Simulate a Sentinel crash.",
    "HELP -- Prints this help.",
    

    So to answer my question it's:

    sentinel remove <master_name>