Redis Sentinel Support

I’m integrating Sentry into existing infrastructure that uses Redis Sentinel to manage HA as opposed to Redis Cluster. Is it possible to configure rb (redis blaster) or Sentry itself to connect via Sentinel?

This gist https://gist.github.com/davewongillies/7cce25a20188b05c2334 works for the initial master node discovery, but you don’t get any of the client auto-failover functionality Sentinel provides because rb doesn’t connect via Sentinel.

If this isn’t an option, I also have RabbitMQ and Memcached installed, so I could use RMQ as the broker, but does the SENTRY_CACHE config option support Memcached?

Thanks in advance!

2 Likes

After taking a second look at the code, it seems like option #2 in my previous comment would work if I set CACHES to use Memcached and then SENTRY_CACHE = 'sentry.cache.django.DjangoCache'. Does that sound reasonable?

I’d still like to use Redis Sentinel if possible since my Memcached installation isn’t HA, but if it’s not possible this solution will be fine.

I have the same issue here with using Sentinel.

I got this example from internet:

from redis.sentinel import Sentinel
sentinel = Sentinel([
                    ('redis-sentinel1', 26379),
                    ('redis-sentinel2', 26379),
                    ('redis-sentinel3', 26379),
                    ], socket_timeout=0.1)
redis_host = sentinel.discover_master('sentry')

SENTRY_BUFFER_OPTIONS = {
    'hosts': {
        0: {
            'host': redis_host[0],
            'port': redis_host[1],
        }
    }
}

But this configuration causes a system alert on web interface:

The ‘hosts’ parameter of SENTRY_BUFFER_OPTIONS setting is deprecated. Please use SENTRY_BUFFER_OPTIONS[“cluster”] instead. This setting will be removed in Sentry 8.5.

Does anyone have any suggestion?

This post seems to be dead, but worths the try!

Are there any plans to support Redis Sentinels on Sentry?

We are also curious about this!