Redis Monitoring

Configure Redis plugin to monitor the performance metrics of your Redis databases.

Start 30-day free trial Try now, sign up in 30 seconds

Redis is an open-source, networked software project that implements data structure servers. Identify and resolve issues with Redis-based apps before end users are affected with Site24x7 plugins.

This document details how to configure the Redis plugin and the monitoring metrics for providing in-depth visibility into the performance, availability, and usage stats of Redis servers.

Redis performance monitoring metrics:

The Various out-of-the-box metrics we support are:

Used Memory

"memory_used" gives the total amount of memory in bytes that is used by the Redis server. If it exceeds physical memory, system will start swapping causing severe performance degradation.

Peak used memory

"memory_used_peak" metric calculates and displays the highest amount of memory in bytes consumed by the Redis server.

Used CPU system

The metric "cpu_used_sys" gets the total amount of system CPU consumed by the Redis server. High CPU usage is not bad as long as it doesn't exceed CPU limit.

Used CPU user

The metric "cpu_used_user" records the total amount of user CPU consumed by the Redis server.

Used CPU user children

The metric "cpu_used_user_children" records the total amount of user CPU consumed by other background processes.

Used CPU system children

Get the total amount of system CPU consumed by background processes with the metric "cpu_used_sys_children".

Keyspace hits

Get the total number of failed key lookups in the main dictionary that have taken place in the system using the metric "keyspace_misses".

Keyspace misses

Use the metric "keyspace_hits" and get the total number of successful key lookups in the main dictionary that have taken place in the system.

Total connections recieved

Get the total number of connections rejected using the metric "rejected_conn". The connections are rejected whenever client limit is reached.

Rejected connections

Use the metric "total_conn_rec" and get the total number of connections accepted by the Redis server.

Connected clients

Get the total number of slave connections made to the Redis server with the metric "conn_slaves".

Connected slaves

The metric "conn_clients" records the total number of client connections made to the Redis server. This count will exclude connections from slaves.

How it works?

  • Log-in to your Site24x7 account. Sign up here if you don't have one.
  • Download and install the latest version of Site24x7 Linux Agent
  • Install the Redis plugin
  • The agent will execute the Redis plugin and push the data to the Site24x7 server

Prerequisites:

  • Site24x7 Redis plugin uses "redis" module to get the performance metrics of Redis server
  • Execute the following command in your server to to install redis module pip install redis

Installing pip:

  • Use "pip" to install redis

    Note: pip is a package management system that is used to install and manage software packages written in Python.

  • For CentOS, Fedora, RHEL:
    yum install python-devel
    yum install python-pip (or)
    easy_install pip
  • For Debian, Ubuntu:
    apt-get -y install python-pip

Redis plugin installation:

  • Create a directory with the name "redis", under Site24x7 Linux Agent plugin directory - /opt/site24x7/monagent/plugins/
  • Download the file "redis.py" from our GitHub repository and place it under the "redis" directory
  • Commands to perform the above step:
  • cd /opt/site24x7/monagent/plugins/
    mkdir redis
    cd redis
    wget https://raw.githubusercontent.com/site24x7/plugins/master/redis/Redis.py
  • Once the plugin file is downloaded, the agent will mark it up in the next data collection and you can view it in Site24x7 client

Redis plugin configuration:

  • By default, the plugin will monitor Redis instance that is configured on "localhost"
  • The default python path given in the plugin script is #!/usr/bin/python. If you wish to provide an alternate python path, replace the existing one preceded by the shebang character "#!".
  • In order to change the monitoring configuration, go to plugins directory and edit the "#Config Section:" in Redis.py file
  • Redis plugin file location - /opt/site24x7agent/monagent/plugins/redis/Redis.py

    #Config Section:
    REDIS_HOST = "localhost"
    REDIS_PORT = "6379"
    REDIS_USERNAME = "root"
    REDIS_PASSWORD = ""
    REDIS_DBS = "0"
    REDIS_QUEUES = ""

Monitoring additional metrics:

  • To monitor additional metrics, edit the "redis.py" file and add the new metrics that need monitoring
  • Increment the plugin version value in the file "redis.py" to view the newly added metrics ( For e.g. change the default plugin version from PLUGIN_VERSION = "1" to "PLUGIN_VERSION = "2")

Related plugins:

  • RabbitMQ plugin - Monitor performance metrics of your RabbitMQ databases
  • MongoDB plugin - Monitor performance metrics of your MongoDB databases
  • Mule plugin - Analyze performance of your Mule server
  • Nagios plugin - Execute thousands of Nagios plugins in Site24x7 without the need of running a Nagios server
  • Out-of-the-box plugins - Monitor your entire app stack with our extensive list of integrations
  • Create custom plugins - Create custom Linux and Windows plugins and monitor custom attributes