Skip to main content

Redis Database

Pack Assets​

Monitored Objects​

The Pack Redis collects metrics for:

  • Clients
  • Commands
  • Connections
  • Cpu
  • Memory
  • Persistence
  • Replication

Collected Metrics​

Metric nameDescriptionUnit
clients.connected.countNumber of client connections (excluding replica connections)
clients.blocked.countNumber of clients pending on a blocking call
clients.longest_output_list.countLongest output list among current client connections
clients.biggest_input_buffer.countBiggest input buffer among current client connections

Prerequisites​

To control your Redis database, the poller can execute INFO command (Eg: https://redis.io/commands/INFO)

Setup​

  1. Install the Centreon Plugin on every Poller:
yum install centreon-plugin-Applications-Databases-Redis
  1. On the Centreon Web interface in Configuration > Monitoring Connector Manager, install the Redis Database Pack

Host configuration​

  • Add a new Host and apply the App-DB-Redis-custom Host Template

Once the template applied, some Macros have to be configured.

With that configuration, the Plugin uses redis-cli executable. tls is supported (redis-cli >= 6.x mandatory).

MandatoryNameDescription
XREDISCUSTOMMODEName of the backend: cli
REDISPORTPort used (Default: 6379)
REDISUSERNAMERedis username (redis-cli >= 6.x mandatory)
REDISPASSWORDRedis password
REDISSENTINELSentinel server
REDISSENTINELORTSentinel port (Default: 26379)
REDISSERVICEService parameter (mandatory if REDISENTINEL macro used)
REDISEXTRAOPTIONSAny extra option you may want to add to the command (eg. a --tls --insecure)

How to install redis-cli 6.x ?​

To use tls and/or ACL users, you need redis-cli >= 6.x.

yum install epel-release
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum --enablerepo=remi install redis

How to test the Plugin and what are the main options for?​

Once the plugin installed, log into your Centreon Poller CLI using the centreon-engine user account and test the Plugin by running the following command:

/usr/lib/centreon/plugins/centreon_database_redis.pl \
--plugin=database::redis::plugin \
--custommode=perlmod \
--mode=clients \
--server='10.30.2.79' \
--port='6379' \
--verbose

Expected command output is shown below:

OK: Clients connected: 1, blocked: 0 | 'clients.connected.count'=1;;;0; 'clients.blocked.count'=0;;;0;

The command above monitors client connections (--mode=clients).

It connects to the host 10.30.2.79 (--hostname='10.30.2.79') on the port 6379 (--port='6379').

All the options as well as all the available thresholds can be displayed by adding the --help parameter to the command:

/usr/lib/centreon/plugins/centreon_database_redis.pl \
--plugin=database::redis::plugin \
--custommode=perlmod \
--mode=clients \
--help

Troubleshooting​

Troubleshooting plugins