Monitoring Redis

This article will help you get the Redis plugin for sd-agent configured and returning metrics

Installing the redis plugin package

Install the redis plugin on Debian/Ubuntu:

sudo apt-get install sd-agent-redis

Install the redis plugin on RHEL/CentOS:

sudo yum install sd-agent-redis

Read more about agent plugins.

Configuring the agent to monitor Redis

1. Configure /etc/sd-agent/conf.d/redisdb.yaml

init_config:

instances:
- host: localhost
port: 6379
  • If you require additional authentication, run Redis with a custom sock etc, edit the rest of the config file as necessary

2. Restart the agent

sudo /etc/init.d/sd-agent restart

or

sudo systemctl restart sd-agent

Verifying the configuration
Execute info to verify the configuration with the following:

sudo /etc/init.d/sd-agent info 

Verifying the configuration
Execute info to verify the configuration with the following:

sudo /etc/init.d/sd-agent info 

or

/usr/share/python/sd-agent/agent.py info

If the agent has been configured correctly you'll see an output such as:

redis
-----
  - instance #0 [OK]
  - Collected * metrics

You can also view the metrics returned with the following command:

sudo -u sd-agent /usr/share/python/sd-agent/agent.py check redisdb

Configuring graphs

Click the name of your server from the Devices list in your Server Density account then go to the Metrics tab. Click the + Graph button on the right then choose the redis metrics to display the graphs. The metrics will also be available to select when building dashboard graphs.

Screen_Shot_2018-01-18_at_11.46.12.png

Monitored metrics

Metric Values
redis.aof.buffer_length
/
Type: float
redis.aof.last_rewrite_time
second /
Type: float
redis.aof.rewrite
/
Type: int
redis.aof.size
byte /
Type: float
redis.clients.biggest_input_buf
/
Type: float
redis.clients.blocked
/
Type: float
redis.clients.longest_output_list
/
Type: float
redis.command.calls

The number of times a redis command has been called, tagged by 'command', e.g. 'command:append'. Enable in Agent's redisdb.yaml with the command_stats option.
None / None
Type: float
redis.command.usec_per_call

The CPU time consumed per redis command call, tagged by 'command', e.g. 'command:append'. Enable in Agent's redisdb.yaml with the command_stats option.
None / None
Type: float
redis.cpu.sys
/
Type: float
redis.cpu.sys_children
/
Type: float
redis.cpu.user
/
Type: float
redis.cpu.user_children
/
Type: float
redis.expires
/
Type: float
redis.expires.percent
percent /
Type: float
redis.info.latency_ms
millisecond /
Type: float
redis.key.length

The number of elements in a given key, tagged by key, e.g. 'key:mykeyname'. Enable in Agent's redisdb.yaml with the keys option.
None / None
Type: float
redis.keys
/
Type: float
redis.keys.evicted
/
Type: float
redis.keys.expired
/
Type: float
redis.mem.fragmentation_ratio
/
Type: float
redis.mem.lua
byte /
Type: float
redis.mem.peak
byte /
Type: float
redis.mem.rss
byte /
Type: float
redis.mem.used
byte /
Type: float
redis.net.clients
/
Type: float
redis.net.commands
/
Type: float
redis.net.rejected
connection /
Type: float
redis.net.slaves
/
Type: float
redis.perf.latest_fork_usec
microsecond /
Type: float
redis.persist
/
Type: float
redis.persist.percent
percent /
Type: float
redis.pubsub.channels
/
Type: float
redis.pubsub.patterns
/
Type: float
redis.rdb.bgsave
/
Type: int
redis.rdb.changes_since_last
/
Type: float
redis.rdb.last_bgsave_time
second /
Type: int
redis.replication.backlog_histlen
/
Type: float
redis.replication.delay

The replication delay in offsets.
offset / None
Type: float
redis.replication.last_io_seconds_ago
second /
Type: int
redis.replication.master_link_down_since_seconds

Amount of time that the master link has been down.
second / None
Type: float
redis.replication.master_repl_offset
/
Type: float
redis.replication.slave_repl_offset
/
Type: float
redis.replication.sync
/
Type: int
redis.replication.sync_left_bytes
byte /
Type: float
redis.slowlog.micros.95percentile

The 95th percentile of the duration of queries reported in the slow log.
microsecond / None
Type: float
redis.slowlog.micros.avg

The average duration of queries reported in the slow log.
microsecond / None
Type: float
redis.slowlog.micros.count

The rate of queries reported in the slow log.
query / second
Type: float
redis.slowlog.micros.max

The maximum duration of queries reported in the slow log.
microsecond / None
Type: float
redis.slowlog.micros.median

The median duration of queries reported in the slow log.
microsecond / None
Type: float
redis.stats.keyspace_hits
/
Type: float
redis.stats.keyspace_misses
/
Type: float

Metrics Conversion

Please refer to the metrics conversion document to map old metrics names to the new metric names.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Monday  —  Friday.

10am  —  6pm UK.

Dedicated Support.