Skip to content

Prometheus Exporter for Redis Metrics. Supports Redis 2.x, 3.x, 4.x, and 5.x

License

Notifications You must be signed in to change notification settings

matian2014/redis_exporter

 
 

Repository files navigation

The project is forked from: https://github.com/oliver006/redis_exporter

Modified it to support redis sentinel.

Add flags:

Name Environment Variable Name Description
sentinel.addrs SENTINEL_ADDRS Address of the Redis sentinels spilt by ',', defaults to localhost:26379.
redis.master REDIS_MASTER Redis master name the sentinels monitoring, defaults to mymaster.

And the flag redis.addr was ignored.

Add a label in metric redis_instance_info named "redis_master_addr" and the value is "<masterIp>:<masterPort>" that the sentinels monitoring

When every scrape request arrives, it will trying to find redis master address by sentinel.addrs and redis.master by command sentinel get-master-addr-by-name <masterName>, and then process as before with redis master address as redis.addr.

About

Prometheus Exporter for Redis Metrics. Supports Redis 2.x, 3.x, 4.x, and 5.x

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 95.1%
  • Shell 3.5%
  • Lua 1.4%