adubkov / zbx_redis_template

Zabbix template for Redis
129 stars 102 forks source link

how to monitor redis with unix socket instead of port number #3

Closed starlessboi closed 10 years ago

starlessboi commented 10 years ago

HI The Redis that I want to monitor, is using unix socket instead of IP and port. Can i use this script to monitor my redis, and if YES, what should be changed to tailor it thanks in advance

adubkov commented 10 years ago

Hi,

I think you can find and replace:

client = redis.StrictRedis(host=host, port=redis_port)

to this:

client = redis.Redis(unix_socket_path='/tmp/redis.sock')

Feel free to refactor this module to use both connections, I'm accepting pull requests.