Are you using Memcached Distributed Memory Cache in your application? You can use IDERA Uptime Cloud Monitor (UCM) to monitor your Memcached Installation for availability and performance. As an illustration, you can configure and receive alerts for the following scenarios:
The full set of Memcached performance metrics that are monitored is available here
Uptime Cloud Monitor from IDERA offers a SAAS based out-of-the-box monitoring solution for Memcached that is easy to set up. If you are not familiar with the concept of custom metrics as used in Uptime Cloud Monitor, please go through Custom Metrics information once before continuing with this document. More details on Custom Metrics can be found here.
There are three steps that you need to do to start monitoring a Memcached service:
Figure 1: In your UCM Account, navigate to Custom>Getting Started
Login to your UCM account and navigate to Custom tab -> Getting Started. Click on Memcached icon.
Figure 2: The Memcached agent installation script
Click on icon to copy the installer script to your clipboard. Paste the command into the terminal window on the server where you want to install the agent. Script can be run on the server running Memcached, or it can be a different server, but this server will need to be continually running in order to monitor Memcached. (If you’re using AWS Elasticache and you don’t have direct server access to the memcached node you’ll need to use a different EC2 instance. Make sure your security groups and any other networking configuration are setup to allow this server to access Elasticache.)
As soon as the script is run on a terminal with root access, it starts downloading the required Memcached monitoring agent on your server. You will need to configure the following items in the agent installation process. Item specified in square brackets ( [ ] ) are the default.
Figure 3: Executing the Memcached agent installation script with user as copperegg, Group as copperegg and monitoring frequency as 15 seconds
Figure 4: Executing the Memcached agent installation script with group name as “memcached”, group label as “Memcached Metrics” and Dashboard as “Memcached”
3. Group label, group name and dashboard name for custom metrics [memcached][Memcached Metrics][Memcached]
Figure 5: Executing the Memcached agent installation script with unique id as local.memcached.server, server URL as localhost and port 11211. Only one Memcached server is added for monitoring.
4. Unique name for this node (good to differentiate if you are monitoring different memcached nodes). [<user>-memcached]
5. Server details : URL and Port for service. [localhost]
6. After configuring one node, you’ll get an option to add more memcached nodes.
Figure 6: Executing the Memcached agent installation script with an upstart init file and the default value for log file name. The installation completes successfully!
7. Configure log file name and upstart job name (defaults present) [/usr/local/copperegg/log/memcached_metrics.log][/etc/init/revealmetrics_memcached.conf]
Navigate to Dashboard and you will see a new Memcached Dashboard has been added automatically by the installer.
Figure 7: A new Dashboard for Memcached has been added
As the installed script executes, you will notice data samples appearing on the widgets for this Dashboard.
Figure 8: Widget inside Memcached Dashboard displaying uptime. The uptime value gradually increases over time as the Memcached service continues to remain operational.
Figure 9: Widget inside Memcached Dashboard displaying count of open connections.
Figure 10: Widget inside Memcached Dashboard displaying count of connection structures.
UCM currently monitors 42 metrics which cover most of the important metrics for memcached from a performance and stability perspective. You can see the same by navigating to the Custom Tab > Custom Objects and selecting Details on the Custom Metrics Group Label [Memcached Metrics] that was given as installation input.
The metrics are:
More details on these metrics can be obtained from the Memcached Wiki.
Default Pre-Configured Alerts for the Memcached Database
As soon as your Memcached Database Monitoring Dashboard comes up, you will notice that some alert configurations have been automatically created by our Installation Script (under Alerts > Configure Alerts). These pre-configured alerts for Memcached Database include:
Number of failed authentications
Alert will be triggered for all errors.
Whether or not server is accepting conns
Warning Alert will be triggered when size becomes 60% of memory.
The number of delete requests the cache has received where the requested key was not found
Warning Alert will be triggered for for every delete request for missing key
The number of get requests the cache has received where the key requested was not found
Warning Alert will be triggered for for every get request for missing key
The number of increment requests the cache has received where the key requested was not found
Warning Alert will be triggered for for every increment request for missing key
The number of decrement requests the cache has received where the requested key was not found
Warning Alert will be triggered for for every decrement request for missing key
The number of Cas requests the cache has received where the key requested was not found
Warning Alert will be triggered for for every CAS request for missing key
The number of items that have been touched, but were not found
Warning Alert will be triggered for for every touch request for missing key
If the alerting condition is met for these pre-configured alerts, some alert notifications may also be triggered.
Configuring your own Alerts for the Memcached Database
Figure 11: A new alert being added that will be triggered when Memcached Open Connections metric exceeds a threshold of 2000 within a time period of 1 min
Alerts can also be configured against any of these 42 monitored metrics for Memcached
You can configure new alerts that will be triggered when performance issues with Memcached arise. You can also configure the notification mechanisms for a triggered alert.
Alerts can also be configured against any of these custom metrics. Uptime Cloud Monitor supports notifying different sets of users with differing notification mechanisms for each alert type.
Notification mechanisms include:
Webhooks are also exposed for clients to configure custom notification mechanisms. More about setting up website probe alerts can be found here.
Sign up for a 14 day FREE TRIAL of Uptime Cloud Monitor (no Credit Card required).
You can find more information about Uptime Cloud Monitor pricing options here.
We charge only $0.08 per month per metric!
Sign up today!