Memcached
Monitor cache performance, hit ratios, memory utilization, and network throughput for your local Memcached instance. The agent connects to the Memcached service and runs the stats command to collect real-time operational data, helping you optimize cache efficiency and resource allocation.
Setup
Preparing Memcached for monitoring typically requires no additional configuration if it is bound to the local interface, as the agent probes the default port 11211.
- Verify bind address: Ensure Memcached is listening on
127.0.0.1. Check your/etc/memcached.conffor the-l 127.0.0.1directive. - Restart Memcached: If you modified the configuration, restart the service:
sudo systemctl restart memcached. - Restart the agent: Restart
simobto trigger service discovery for the new endpoint:sudo systemctl restart simob. - Enable in UI: Once discovered, explicitly enable the Memcached collector in your dashboard’s server configuration panel.
Configuration
The agent automatically discovers Memcached if it is running on the default port 11211 on localhost. No additional configuration is required for standard installations.
Metrics
The following metrics are collected from the Memcached stats output:
| Metric | Type | Unit | Description |
|---|---|---|---|
memcached_connections_current_total | Gauge | - | Number of open connections to the server. |
memcached_connections_rate | Gauge | conns/s | Rate of new connections per second. |
memcached_items_current_total | Gauge | - | Total number of items currently stored by the server. |
memcached_items_rate | Gauge | items/s | Rate of new items being stored in the cache. |
memcached_get_rate | Gauge | ops/s | Number of get commands processed per second. |
memcached_set_rate | Gauge | ops/s | Number of set commands processed per second. |
memcached_get_hits_rate | Gauge | hits/s | Number of keys that have been requested and found per second. |
memcached_get_misses_rate | Gauge | misses/s | Number of keys that have been requested and not found per second. |
memcached_delete_hits_rate | Gauge | ops/s | Number of deletion requests that successfully found a key. |
memcached_delete_misses_rate | Gauge | ops/s | Number of deletion requests for keys that did not exist. |
memcached_incr_hits_rate | Gauge | ops/s | Number of increment requests that successfully found a key. |
memcached_incr_misses_rate | Gauge | ops/s | Number of increment requests for keys that did not exist. |
memcached_decr_hits_rate | Gauge | ops/s | Number of decrement requests that successfully found a key. |
memcached_decr_misses_rate | Gauge | ops/s | Number of decrement requests for keys that did not exist. |
memcached_read_bps | Gauge | bytes/s | Total bytes read by the server from the network per second. |
memcached_written_bps | Gauge | bytes/s | Total bytes written by the server to the network per second. |
memcached_limit_bytes | Gauge | bytes | Maximum number of bytes the server is allowed to use for items. |
memcached_used_bytes | Gauge | bytes | Current number of bytes used by the server to store items. |
Troubleshooting
Verify the endpoint
You can manually verify that Memcached is responding to the stats command using nc (netcat):
echo "stats" | nc 127.0.0.1 11211
Or using memstat if the libmemcached-tools package is installed:
memstat --servers=127.0.0.1
Discovery issues
If Memcached is not appearing in the UI, ensure that it is running and accessible on 127.0.0.1:11211. If you are using a custom port or address, please note that current auto-discovery only supports default settings.