Redis

Version 1

    This template retrieves the status of a Redis server installed on a Linux or Unix computer.


    Prerequisites: SSH and Perl installed on the target server. SNMP installed on the target server and permission to monitor the redis-server process.

    Credentials: Redis or root user.


    This template was tested on Redis 2.8.17.

    Note: Before using this monitor, the correct argument should be set to all script monitors. All monitors require the following arguments:

    perl ${SCRIPT} path_to_redis_cli port password
    where
    path_to_redis_cli
    This is the full path to the redis-cli command.
    port
    This is the port on which Redis works.
    password
    This is the password for Redis. It is recommended that you create a user with the same password as Redis and use this user for monitoring. Use ${PASSWORD} as the argument.
    Following is an example using the Scripts Arguments field:
    perl ${SCRIPT} /usr/local/bin/redis-cli 6379 ${PASSWORD}


    Monitored Components

    Process: Redis Server

    This monitor returns the CPU and memory usage of Redis.

     

    TCP Port: Redis Server

    This component monitor tests the ability of Redis to accept incoming sessions. It monitors TCP port 6379

     

    System

    The returned values are as follows:

         Connected Clients – This component returns the number of client connections (excluding connections from slaves).

         Blocked Clients – This component returns the number of clients pending on a blocking call (BLPOP, BRPOP, BRPOPLPUSH).

         Used Memory – This component returns the total number of bytes allocated by Redis using its allocator (either standard libc, jemalloc, or an alternative allocator such as tcmalloc.)

         Used Memory RSS – This component returns the number of bytes that Redis allocated as seen by the operating system (a.k.a resident set size). This is the number reported by tools such as top and ps.

         Used Memory Lua – This component returns the number of bytes used by the Lua engine.

         Memory Fragmentation Ratio – This component returns the ratio between Used Memory RSS and Used Memory.

         Used CPU System – This component returns the System CPU consumed by the Redis server.

         Used CPU User – This component returns the User CPU consumed by the Redis server.

         Used CPU System Children – This component returns the System CPU consumed by the background processes.

         Used CPU User Children – This component returns the User CPU consumed by the background processes.

     

    Persistence

    The returned values are as follows:

         Loading – This component returns the flag indicating if the load of a dump file is on-going.

         RDB Save in Progress – This component returns the flag indicating a RDB save is on-going.

         RDB Last Save Status – This component returns the status of the last RDB save operation.

         RDB Last Save Time – This component returns the duration of the last RDB save operation in seconds.

         AOF Enabled – This component returns the flag indicating AOF logging is activated.

         AOF Rewrite in Progress – This component returns the flag indicating an AOF rewrite operation is on-going.

         AOF Rewrite Scheduled – This component returns the flag indicating an AOF rewrite operation will be scheduled once the on-going RDB save is complete.

         AOF Last Rewrite Time – This component returns the duration of the last AOF rewrite operation in seconds.

         AOF Last Rewrite Status – This component returns the status of the last AOF rewrite operation.

         AOF Last Write Status – This component returns the status of the last AOF write operation.

     

    General

    The returned values are as follows:

         Connections Received – This component returns the total number of connections accepted by the server.

         Commands Processed – This component returns the total number of commands processed by the server.

         Rejected Connections – This component returns the number of connections rejected because of the maxclients limit.

         Expired Keys – This component returns the total number of key expiration events.

         Evicted Keys – This component returns the number of evicted keys due to the maxmemory limit.

         Keyspace Hits – This component returns the number of successful lookup of keys in the main dictionary.

         Keyspace Misses – This component returns the number of failed lookup of keys in the main dictionary.

         Note: This component has “Count statistic as difference” enabled. It will return the difference between two polling intervals.

     

    Replication

    The returned values are as follows:

         Role – This component returns the role status: 0 for "master" and 1 for "slave" if the instance is enslaved to a master. Note that a slave can be the master of another slave (daisy chaining).

         Connected Slaves – This component returns the number of connected slaves.

         Master Replication Offset – This component returns the master replication offset.

         Master Link Status – This component returns the status of the link (0 –up and 1- down).

         Master Last IO Seconds Ago – This component returns the number of seconds since the last interaction with master.

         Master Sync in Progress – This component indicates the master is SYNCing to the slave (value 1) or not (value 0).

         Note: By default, this monitor is disabled.

     

    Copyright 2014. Portions of this template are based on the following: http://redis.io/commands/INFO

    Last updated 12/2/2014