This article will help you get the Memcached plugin for sd-agent configured and returning metrics
Installing the memcached plugin package
Install the memcached plugin on Debian/Ubuntu:
sudo apt-get install sd-agent-memcache
Install the memcached plugin on RHEL/CentOS:
sudo yum install sd-agent-memcache
Read more about agent plugins.
Configuring the agent to monitor Memcached
1. Configure /etc/sd-agent/conf.d/mcache.yaml
init_config:
instances:
- url: localhost # url to connect to the memcached instance
- If memcached runs on a port other than 11211, specify the port in the config file as necessary
2. Restart the agent
Verifying the configuration
Execute info to verify the configuration with the following:
sudo /etc/init.d/sd-agent info
or
/usr/share/python/sd-agent/agent.py info
If the agent has been configured correctly you'll see an output such as:
memcached ----- - instance #0 [OK] - Collected * metrics
You can also view the metrics returned with the following command:
sudo -u sd-agent /usr/share/python/sd-agent/agent.py check mcache
Configuring graphs
Click the name of your server from the Devices list in your Server Density account then go to the Metrics tab. Click the + Graph button on the right then choose the memcached metrics to display the graphs. The metrics will also be available to select when building dashboard graphs.
Monitored metrics
Metric | Values |
---|---|
memcache.avg_item_size The average size of an item. |
byte / None Type: float |
memcache.bytes |
byte / Type: float |
memcache.bytes_read_rate |
byte / Type: float |
memcache.bytes_written_rate |
byte / Type: float |
memcache.cas_badval_rate |
/ Type: float |
memcache.cas_hits_rate |
/ Type: float |
memcache.cas_misses_rate |
/ Type: float |
memcache.cmd_flush_rate |
byte / Type: float |
memcache.cmd_get_rate Rate of "get" commands. |
command / second Type: float |
memcache.cmd_set_rate |
/ Type: float |
memcache.connection_structures |
/ Type: float |
memcache.curr_connections |
/ Type: float |
memcache.curr_items |
/ Type: float |
memcache.delete_hits_rate |
/ Type: float |
memcache.delete_misses_rate |
/ Type: float |
memcache.evictions_rate |
byte / Type: float |
memcache.fill_percent |
percent / Type: float |
memcache.get_hit_percent Percentage of requested keys that are found present. |
percent / None Type: float |
memcache.get_hits_rate |
/ Type: float |
memcache.get_misses_rate |
/ Type: float |
memcache.items.age Age of the oldest item in the LRU |
second / None Type: float |
memcache.items.crawler_reclaimed_rate Rate at which items freed by the LRU Crawler |
operation / second Type: float |
memcache.items.direct_reclaims_rate Rate at which worker threads had to directly pull LRU tails to find memory for a new item |
operation / second Type: float |
memcache.items.evicted_nonzero_rate Rate at which nonzero items which had an explicit expire time set had to be evicted from the LRU before expiring |
eviction / second Type: float |
memcache.items.evicted_rate Rate st which items had to be evicted from the LRU before expiring |
eviction / second Type: float |
memcache.items.evicted_time Seconds since the last access for the most recent item evicted from this class |
second / None Type: float |
memcache.items.evicted_unfetched_rate Rate at which valid items evicted from the LRU which were never touched after being set |
eviction / second Type: float |
memcache.items.expired_unfetched_rate Rate at which expired items reclaimed from the LRU which were never touched after being set |
eviction / second Type: float |
memcache.items.lrutail_reflocked_rate Rate at which items found to be refcount locked in the LRU tail |
item / second Type: float |
memcache.items.moves_to_cold_rate Rate at which items were moved from HOT or WARM into COLD |
item / second Type: float |
memcache.items.moves_to_warm_rate Rate at which items were moved from COLD to WARM |
item / second Type: float |
memcache.items.moves_within_lru_rate Rate at which active items were bumped within HOT or WARM |
item / second Type: float |
memcache.items.number Number of items presently stored in this slab class |
item / None Type: float |
memcache.items.number_cold Number of items presently stored in the COLD LRU |
item / None Type: float |
memcache.items.number_hot Number of items presently stored in the HOT LRU |
item / None Type: float |
memcache.items.number_noexp Number of items presently stored in the NOEXP class |
item / None Type: float |
memcache.items.number_warm Number of items presently stored in the WARM LRU |
item / None Type: float |
memcache.items.outofmemory_rate Rate at which the underlying slab class was unable to store a new item |
error / second Type: float |
memcache.items.reclaimed_rate Rate at which entries were stored using memory from an expired entry |
operation / second Type: float |
memcache.items.tailrepairs_rate Rate at which memcache self-healed a slab with a refcount leak |
operation / second Type: float |
memcache.limit_maxbytes |
byte / Type: float |
memcache.listen_disabled_num_rate Rate at which the server has reached the max connection limit. |
event / second Type: float |
memcache.pointer_size |
/ Type: float |
memcache.rusage_system_rate |
second / Type: float |
memcache.rusage_user_rate |
second / Type: float |
memcache.slabs.active_slabs Total number of slab classes allocated |
occurrence / None Type: float |
memcache.slabs.cas_badval_rate Rate at which CAS commands failed to modify a value due to a bad CAS id |
key / second Type: float |
memcache.slabs.cas_hits_rate Rate at which CAS commands modified this slab class |
operation / second Type: float |
memcache.slabs.chunk_size The amount of space each chunk uses |
byte / None Type: float |
memcache.slabs.chunks_per_page How many chunks exist within one page |
buffer / None Type: float |
memcache.slabs.cmd_set_rate Rate at which set requests stored data in this slab class |
command / second Type: float |
memcache.slabs.decr_hits_rate Rate at which decrs commands modified this slab class |
operation / second Type: float |
memcache.slabs.delete_hits_rate Rate at which delete commands succeeded in this slab class |
operation / second Type: float |
memcache.slabs.free_chunks Chunks not yet allocated to items or freed via delete |
buffer / None Type: float |
memcache.slabs.free_chunks_end Number of free chunks at the end of the last allocated page |
buffer / None Type: float |
memcache.slabs.get_hits_rate Rate at which get requests were serviced by this slab class |
hit / second Type: float |
memcache.slabs.incr_hits_rate Rate at which incrs commands modified this slab class |
operation / second Type: float |
memcache.slabs.mem_requested Number of bytes requested to be stored in this slab |
byte / None Type: float |
memcache.slabs.total_chunks Total number of chunks allocated to the slab class |
buffer / None Type: float |
memcache.slabs.total_malloced Total amount of memory allocated to slab pages |
byte / None Type: float |
memcache.slabs.total_pages Total number of pages allocated to the slab class |
page / None Type: float |
memcache.slabs.touch_hits_rate Rate of touches serviced by this slab class |
operation / second Type: float |
memcache.slabs.used_chunks How many chunks have been allocated to items |
buffer / None Type: float |
memcache.slabs.used_chunks_rate Rate at which chunks have been allocated to items |
buffer / second Type: float |
memcache.threads |
/ Type: float |
memcache.total_connections_rate |
/ Type: float |
memcache.total_items |
/ Type: float |
memcache.uptime |
second / Type: float |
Thanks! We've updated the article.
Hey!
The command to install on Debian/Ubuntu should be:
as per shown when performing
Cheers,