mdawar / rq-exporter

Prometheus metrics exporter for Python RQ (Redis Queue).
MIT License
65 stars 28 forks source link

how to disable sentinel support in v1.9.0 #18

Closed amarmahtani closed 2 years ago

amarmahtani commented 2 years ago

I have a regular single instance of redis running in a k8s pod, and as a side car app I was running v1.8.0 of rq-exporter. Looked to upgrade the version to v1.9.0 and received the error

  File "/usr/local/lib/python3.8/site-packages/redis/sentinel.py", line 219, in discover_master
    raise MasterNotFoundError("No master found for %r" % (service_name,))
redis.sentinel.MasterNotFoundError: No master found for 'master'

How could I use rq-exporter v1.9.0 just for non-sentinel redis? Thank you and I really am grateful I found this tool for our monitoring purposes.

amarmahtani commented 2 years ago

Nvm, went through the code and found out that we just need to setup the environment variable RQ_SENTINEL_HOST to an empty value, and that should take care of it

       env:
        - name: RQ_SENTINEL_HOST
        - name: RQ_REDIS_PASS
          valueFrom:
            secretKeyRef: