The purpose of this module is to get performance stats from redis.
The module creates a hiredis client and a statsd client.
On initialization the module creates another thread that will periodically update the statsd server by running the info
command and than update all corresponding gauges.
- Some
info
parmas are not parsed currectly. - update interval is not configurable
- cmake
- pthreads
- hiredis (install via brew or your favourite package manager)
- statsd-c-client (fetch using git submodule)
- RedisModulesSDK ()
- fetch submodules, run the following:
git submodule init
git submodule update
- compile RedisModulesSDK:
cd RedisModulesSDK/rmutil
make
- go back to main directory, and create a
bin
directory, run cmake and compile:
cd ../..
mkdir bin
cd bin
cmake ..
make
the module should be in your current directory (bin
) named libredis_info_statsd.dylib
or libredis_info_statsd.so
.
using the loadmodule command, or by configuration file:
loadmodule PATH_TO_redis-info-statsd/bin/libredis_info_statsd.dylib
By default the module will send the metrics to localhost:8125 using the namespace "redis" you can override it by passing 3 arguments to loadmodule:
loadmodule PATH_TO_redis-info-stats/bin/libredis_info_statsd.dylib 172.16.0.2 8125 redis-23