Skip to main content

Redis collector

Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker.


This module monitors one or more Redis instances, depending on your configuration.

It collects information and statistics about the server executing the following commands:

Metrics

All metrics have "redis." prefix.

MetricScopeDimensionsUnits
connectionsglobalaccepted, rejectedconnections/s
clientsglobalconnected, blocked, tracking, in_timeout_tableclients
ping_latencyglobalmin, max, avgseconds
commandsglobalprocessescommands/s
keyspace_lookup_hit_rategloballookup_hit_ratepercentage
memoryglobalmax, used, rss, peak, dataset, lua, scriptsbytes
mem_fragmentation_ratioglobalmem_fragmentationratio
key_eviction_eventsglobalevictedkeys/s
netglobalreceived, sentkilobits/s
rdb_changesglobalchangesoperations
bgsave_nowglobalcurrent_bgsave_timeseconds
bgsave_healthgloballast_bgsavestatus
bgsave_last_rdb_save_since_timegloballast_bgsave_timeseconds
aof_file_sizeglobalcurrent, basebytes
commands_callsglobala dimension per commandcalls
commands_usecglobala dimension per commandmicroseconds
commands_usec_per_secglobala dimension per commandmicroseconds/s
key_expiration_eventsglobalexpiredkeys/s
database_keysglobala dimension per databasekeys
database_expires_keysglobala dimension per databasekeys
connected_replicasglobalconnectedreplicas
master_link_statusglobalup, downstatus
master_last_io_since_timeglobaltimeseconds
master_link_down_since_timeglobaltimeseconds
uptimeglobaluptimeseconds

Configuration

Edit the go.d/redis.conf configuration file using edit-config from the Netdata config directory, which is typically at /etc/netdata.

cd /etc/netdata # Replace this path with your Netdata config directory
sudo ./edit-config go.d/redis.conf

There are two connection types: by tcp socket and by unix socket.

Note: If the Redis server is password protected via the requirepass option, make sure you have a colon before the password.

# by tcp socket
redis://<user>:<password>@<host>:<port>

# by unix socket
unix://<user>:<password>@</path/to/redis.sock

Needs only address, here is an example with two jobs:

jobs:
- name: local
address: 'redis://@127.0.0.1:6379'

- name: local
address: 'redis://:[email protected]:6379'

- name: local
address: 'redis://127.0.0.1:6379'
username: 'user'
password: 'password'

- name: remote
address: 'redis://user:[email protected]:6379'

For all available options, see the redis collector's configuration file.

Troubleshooting

To troubleshoot issues with the redis collector, run the go.d.plugin with the debug option enabled. The output should give you clues as to why the collector isn't working.

  • Navigate to the plugins.d directory, usually at /usr/libexec/netdata/plugins.d/. If that's not the case on your system, open netdata.conf and look for the plugins setting under [directories].

    cd /usr/libexec/netdata/plugins.d/
  • Switch to the netdata user.

    sudo -u netdata -s
  • Run the go.d.plugin to debug the collector:

    ./go.d.plugin -d -m redis

Do you have any feedback for this page? If so, you can open a new issue on our netdata/learn repository.