0

When adding a master to Sentinel, I always add the entries by editing sentinel.conf, but I often find out that application is being rewritten by another user (Sentinel).

I'm wondering if there is a more appropriate and an efficient way to add hosts to Sentinel without the need to edit the config file manually.

N00b Pr0grammer
  • 4,503
  • 5
  • 32
  • 46
Taleeb
  • 125
  • 1
  • 8

1 Answers1

1

You can configure sentinel to monitor a new master at runtime.

Example:

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

For additional information check out the Redis Sentinel docs: https://redis.io/topics/sentinel#reconfiguring-sentinel-at-runtime

Hope that helps!

davissp14
  • 765
  • 4
  • 13