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:
"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".
Get the total number of failed key lookups in the main dictionary that have taken place in the system using the metric "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.
Use the metric "total_conn_rec" and get the total number of connections accepted by the Redis server.
Get the total number of slave connections made to the Redis server with the metric "conn_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?
- 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
- 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-develyum 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:
- 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
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")
- 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