Memcached is a general-purpose, free, and open-source software distributed memory caching system. It is often used to speed up dynamic database-driven websites by caching data and objects in RAM to reduce the number of times an external data source must be read.
Prerequisite
For Virtual Machines, install the Linux Agent.
Configuring the credentials
Configure the credentials in the directory /opt/opsramp/agent/conf/app.d/creds.yaml
memcached:
- name: memcached
user: <username>
pwd: <Password>
encoding-type: plain
labels:
key1: val1
key2: val2
Configuring the application
Virtual machine
Configure the application in the directory /opt/opsramp/agent/conf/app/discovery/auto-detection.yaml
- name: memcached
instance-checks:
service-check:
- memcache
process-check:
- memcache
port-check:
- 11211
detection-pattern: "(process-check && service-check && port-check)"
freq-secs: "60"
Docker environment
Configure the application in the directory /opt/opsramp/agent/conf/app/discovery/auto-container-detection.yaml
- name: memcached
container-checks:
image-check:
- memcached
port-check:
- 11211
detection-pattern: "(image-check && port-check)"
freq-secs: "60"
Kubernetes environment
Configure the application in config.yaml
- name: memcached
container-checks:
image-check:
- memcached
port-check:
- 11211
detection-pattern: "(image-check && port-check)"
freq-secs: "60"
Validate
Go to Resources under the Infrastructure tab to check if your resources are onboarded and the metrics are collected.
Supported metrics
OpsRamp Metric | Metric Display Name | Unit |
---|---|---|
memcached_bytes Current number of bytes used by this server to store items | bytes | bytes |
memcached_bytes_read Rate of bytes read from the network by this server | bytes_read | bytes / second |
memcached_bytes_written Rate of bytes written to the network by this server | bytes_written | bytes / second |
memcached_cas_badval Rate at which keys are compared and swapped where the comparison (original) value did not match the supplied value | cas_badval | keys / second |
memcached_cas_hits Rate at which keys are compared and swapped and found present | cas_hits | hits / second |
memcached_cas_misses Rate at which keys are compared and swapped and not found present | cas_misses | misses / second |
memcached_cmd_flush Rate of flush_all commands | cmd_flush | commands / second |
memcached_cmd_get Rate of get commands | cmd_get | commands / second |
memcached_cmd_set Rate of set commands | cmd_set | commands / second |
memcached_connection_structures Number of connection structures allocated by the server | connection_structures | |
memcached_curr_connections Number of open connections to this server | curr_connections | connection |
memcached_curr_items Current number of items stored by the server | curr_items | items |
memcached_delete_hits Rate at which delete commands result in items being removed | delete_hits | hits / second |
memcached_delete_misses Rate at which delete commands result in no items being removed | delete_misses | misses / second |
memcached_evictions Rate at which valid items are removed from cache to free memory for new items | evictions | evictions / second |
memcached_get_hits Rate at which keys are requested and found present | get_hits | hits / second |
memcached_get_misses Rate at which keys are requested and not found | get_misses | misses / second |
memcached_limit_maxbytes Number of bytes this server is allowed to use for storage | limit_maxbytes | megabytes |
memcached_listen_disabled_num Rate at which the server has reached the maximum connection limit | listen_disabled_num | events / second |
memcached_pointer_size Default size of pointers on the host OS, generally 32 or 64 | pointer_size | bits |
memcached_rusage_system Fraction of time the CPU spent executing kernel code on behalf of this server process | rusage_system | fraction |
memcached_rusage_user Fraction of user time the CPU spent executing this server process | rusage_user | fraction |
memcached_threads Number of threads used by the current Memcached server process | threads | thread |
memcached_total_connections Rate at which connections to this server are opened | total_connections | connection / second |
memcached_total_items Total number of items stored by this server since it started | total_items | items |
memcached_uptime Number of minutes this serverran | uptime | minutes |
memcached_items_evicted Rate at which items had to be evicted from the LRU before expiring | items_evicted | eviction/sec |
memcached_items_evicted_nonzero Rate at which nonzero items which had an explicit expiry time set had to be evicted from the LRU before expiring | items_evicted_nonzero | evictions / second |
memcached_items_evicted_unfetched Rate at which expired items reclaimed from the LRU which were never touched after being set | items_evicted_unfetched | evictions / second |
memcached_items_expired_unfetched Rate at which valid items evicted from the LRU which were never touched after being set | items_expired_unfetched | evictions / second |
memcached_items_outofmemory Rate at which the underlying slab class was unable to store a new item | items_outofmemory | errors / second |
memcached_items_tailrepairs Rate at which memcache self-healed a slab with a refcount leak | items_tailrepairs | operations / second |
memcached_items_moves_to_cold Rate at which items were moved from HOT or WARM into COLD | items_moves_to_cold | items / second |
memcached_items_moves_to_warm Rate at which items were moved from COLD to WARM | items_moves_to_warm | items / second |
memcached_items_moves_within_lru Rate at which active items were bumped within HOT or WARM | items_moves_within_lru | items / second |
memcached_items_reclaimed Rate at which entries were stored using memory from an expired entry | items_reclaimed | operations / second |
memcached_items_crawler_reclaimed Rate at which items were freed by the LRU Crawler | items_crawler_reclaimed | operations / second |
memcached_items_lrutail_reflocked Rate at which items found to be refcount locked in the LRU tail | items_lrutail_reflocked | items / second |
memcached_items_direct_reclaims Rate at which worker threads had to directly pull LRU tails to find memory for a new item | items_direct_reclaims | operations / second |
memcached_items_number Number of items presently stored in this slab class | items_number | items |
memcached_items_number_hot Number of items presently stored in the HOT LRU | items_number_hot | items |
memcached_items_number_warm Number of items presently stored in the WARM LRU | items_number_warm | items |
memcached_items_number_cold Number of items presently stored in the COLD LRU | items_number_cold | items |
memcached_items_age Age of the oldest item in the LRU | items_age | seconds |
memcached_items_evicted_time Time since the last access for the most recent item evicted from this class | items_evicted_time | seconds |
memcached_slabs_get_hits Rate at which GET requests were serviced by this slab class | slabs_get_hits | hits / second |
memcached_slabs_cmd_set Rate at which set requests stored data in this slab class | slabs_cmd_set | commands / second |
memcached_slabs_delete_hits Rate at which delete commands succeeded in this slab class | slabs_delete_hits | operations / second |
memcached_slabs_incr_hits Rate at which incrs commands modified this slab class | slabs_incr_hits | operations / second |
memcached_slabs_decr_hits Rate at which decrs commands modified this slab class | slabs_decr_hits | operations / second |
memcached_slabs_cas_hits Rate at which CAS commands modified this slab class | slabs_cas_hits | operations / second |
memcached_slabs_cas_badval Rate at which CAS commands failed to change a value due to a bad CAS ID | slabs_cas_badval | keys / second |
memcached_slabs_touch_hits Rate of touches serviced by this slab class | slabs_touch_hits | operations / second |
memcached_slabs_used_chunks_rate Rate at which chunks allocated to items | slabs_used_chunks_rate | buffer / second |
memcached_slabs_chunk_size Amount of space each chunk uses | slabs_chunk_size | bytes |
memcached_slabs_chunks_per_page Chunks existing in one page | slabs_chunks_per_page | buffer |
memcached_slabs_total_pages Total number of pages allocated to the slab class | slabs_total_pages | page |
memcached_slabs_total_chunks Total number of chunks allocated to the slab class | slabs_total_chunks | buffer |
memcached_slabs_used_chunks How many chunks allocated to items | slabs_used_chunks | buffer |
memcached_slabs_free_chunks Chunks not yet allocated to items or freed using delete | slabs_free_chunks | buffer |
memcached_slabs_free_chunks_end Number of free chunks at the end of the last allocated page | slabs_free_chunks_end | buffer |
memcached_slabs_mem_requested Number of bytes requested to be stored in this slab | slabs_mem_requested | bytes |
memcached_slabs_active_slabs Total number of slab classes allocated | slabs_active_slabs | occurance |
memcached_slabs_total_malloced Total memory allocated to slab pages | slabs_total_malloced | bytes |