Memcached is a free and open-source, general purpose distributed memory caching system. Analyze the performance of your Memcached server and take informed troubleshooting descisions by keeping track of critical metrics.
This document details how to configure the Memcached plugin and the monitoring metrics for providing in-depth visibility into the performance, availability, and usage stats of Memcached servers.
Performance Monitoring Metrics
bytes metric counts and records the total number of bytes currently used by the server to store items. I.e., the number of bytes currently used for caching items.
bytes_read metric counts and records the total number of bytes read by the server from network.
The total number of bytes sent over the network by the server is recorded using the metric
bytes_written. It has no bearing or connection on the total size of the data you're storing.
connections_current records the total number of connected clients. If this value is very high or low, then the chances of system failure are high. Ideally, the number of open connections to the Memcached server should be the same value on all servers.
connections_total records the total number of connections opened since the server started running. Ideally, the total number of connections should be lesser than the total number of get/set commands.
Get the total number of worker threads requested with the metric
threads. This metric represents the total number of threads used to process incoming requests. Ideally, this should'nt be higher than the totala number of CPU cores on the server.
Use the metric
evictions and get the total number of evictions made in your Memcached server. An eviction occurs when an object that has time to live is removed from the cache because a brand new item needs to be allocated.
Limit maximum bytes
The total number of bytes the server is permitted to use for storage is recorded using the metric
- Ensure the 'python-memcached' module is installed to get the performance metrics from the Memcached server. The Site24x7 Linux monitoring agent will automatically install the 'python-memcached' module. If the installation fails, refer the following section to install it manually.
- Our Linux server monitoring agent should be installed in the server where you plan to run the plugin.
- While adding a plugin, the plugin name and its folder name should be identical.
- Execute the following command in your server to install the python requests module
sudo pip install python-memcached
- Use "pip" to install requests module
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
- Download and install the latest version of the Site24x7 Linux agent in the server where you plan to run the plugin. If it is installed successfully, you will see a Linux server monitor in the Site24x7 Control Panel. This confirms that the agent is able to communicate with our data center.
- Download the file memcached.py file from our GitHub repository.
- By default, the plugin will monitor the Memcached instance that is configured on 'localhost'. To change the configuration, edit the "#Config Section:" in 'memcached.py' file.
- Create a folder with the name 'memcached', under Site24x7 Linux agent plugin directory - '/opt/site24x7/monagent/plugins/' and place the 'memcached.py' under '/opt/site24x7/monagent/plugins/memcached/'
View Data in the Site24x7 Web Client
- Log in to Site24x7 and go to Server > Plugins > Name of Plugin Monitor.
- You will be able to view the performance charts on the various metrics for your Memcached server.
Feel free to contribute to our existing plugin and come up with suggestions or feedback on our Community.
Other Plugin Integrations
- Collaboration plugins - Monitor Slack, Confluent, Confluence, GitHub and more.
- NFS Monitoring - Monitor NFS file system usage on Linux servers.
- Virtual Private Network (VPN) Monitoring - Ensure continued availability of VPN connection across multiple locations.
- HP iLO Monitoring - Monitor the health status and hardware configurations of HP iLO interfaces.
- Other monitoring integrations - Monitor your entire app stack with our extensive list of integrations.
- Create custom plugins - Linux and Windows