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.
Metrics
OpsRamp Metric | Metric Display Name | Unit | Description |
---|---|---|---|
memcached_bytes | bytes | bytes | Current number of bytes used by this server to store items |
memcached_bytes_read | bytes_read | bytes / second | Rate of bytes read from the network by this server |
memcached_bytes_written | bytes_written | bytes / second | Rate of bytes written to the network by this server |
memcached_cas_badval | cas_badval | keys / second | Rate at which keys are compared and swapped where the comparison (original) value did not match the supplied value |
memcached_cas_hits | cas_hits | hits / second | Rate at which keys are compared and swapped and found present |
memcached_cas_misses | cas_misses | misses / second | Rate at which keys are compared and swapped and not found present |
memcached_cmd_flush | cmd_flush | commands / second | Rate of flush_all commands |
memcached_cmd_get | cmd_get | commands / second | Rate of get commands |
memcached_cmd_set | cmd_set | commands / second | Rate of set commands |
memcached_connection_structures | connection_structures | Number of connection structures allocated by the server | |
memcached_curr_connections | curr_connections | connection | Number of open connections to this server |
memcached_curr_items | curr_items | items | Current number of items stored by the server |
memcached_delete_hits | delete_hits | hits / second | Rate at which delete commands result in items being removed |
memcached_delete_misses | delete_misses | misses / second | Rate at which delete commands result in no items being removed |
memcached_evictions | evictions | evictions / second | Rate at which valid items are removed from cache to free memory for new items |
memcached_get_hits | get_hits | hits / second | Rate at which keys are requested and found present |
memcached_get_misses | get_misses | misses / second | Rate at which keys are requested and not found |
memcached_limit_maxbytes | limit_maxbytes | megabytes | Number of bytes this server is allowed to use for storage |
memcached_listen_disabled_num | listen_disabled_num | events / second | Rate at which the server has reached the maximum connection limit |
memcached_pointer_size | pointer_size | bits | Default size of pointers on the host OS, generally 32 or 64 |
memcached_rusage_system | rusage_system | fraction | Fraction of time the CPU spent executing kernel code on behalf of this server process |
memcached_rusage_user | rusage_user | fraction | Fraction of user time the CPU spent executing this server process |
memcached_threads | threads | thread | Number of threads used by the current Memcached server process |
memcached_total_connections | total_connections | connection / second | Rate at which connections to this server are opened |
memcached_total_items | total_items | items | Total number of items stored by this server since it started |
memcached_uptime | uptime | minutes | Number of minutes this server has been running |
memcached_items_evicted | items_evicted | eviction/sec | Rate at which items had to be evicted from the LRU before expiring |
memcached_items_evicted_nonzero | items_evicted_nonzero | evictions / second | Rate at which nonzero items which had an explicit expiry time set had to be evicted from the LRU before expiring |
memcached_items_evicted_unfetched | items_evicted_unfetched | evictions / second | Rate at which expired items reclaimed from the LRU which were never touched after being set |
memcached_items_expired_unfetched | items_expired_unfetched | evictions / second | Rate at which valid items evicted from the LRU which were never touched after being set |
memcached_items_outofmemory | items_outofmemory | errors / second | Rate at which the underlying slab class was unable to store a new item |
memcached_items_tailrepairs | items_tailrepairs | operations / second | Rate at which memcache self-healed a slab with a refcount leak |
memcached_items_moves_to_cold | items_moves_to_cold | items / second | Rate at which items were moved from HOT or WARM into COLD |
memcached_items_moves_to_warm | items_moves_to_warm | items / second | Rate at which items were moved from COLD to WARM |
memcached_items_moves_within_lru | items_moves_within_lru | items / second | Rate at which active items were bumped within HOT or WARM |
memcached_items_reclaimed | items_reclaimed | operations / second | Rate at which entries were stored using memory from an expired entry |
memcached_items_crawler_reclaimed | items_crawler_reclaimed | operations / second | Rate at which items were freed by the LRU Crawler |
memcached_items_lrutail_reflocked | items_lrutail_reflocked | items / second | Rate at which items found to be refcount locked in the LRU tail |
memcached_items_direct_reclaims | items_direct_reclaims | operations / second | Rate at which worker threads had to directly pull LRU tails to find memory for a new item |
memcached_items_number | items_number | items | Number of items presently stored in this slab class |
memcached_items_number_hot | items_number_hot | items | Number of items presently stored in the HOT LRU |
memcached_items_number_warm | items_number_warm | items | Number of items presently stored in the WARM LRU |
memcached_items_number_cold | items_number_cold | items | Number of items presently stored in the COLD LRU |
memcached_items_age | items_age | seconds | Age of the oldest item in the LRU |
memcached_items_evicted_time | items_evicted_time | seconds | Time since the last access for the most recent item evicted from this class |
memcached_slabs_get_hits | slabs_get_hits | hits / second | Rate at which GET requests were serviced by this slab class |
memcached_slabs_cmd_set | slabs_cmd_set | commands / second | Rate at which set requests stored data in this slab class |
memcached_slabs_delete_hits | slabs_delete_hits | operations / second | Rate at which delete commands succeeded in this slab class |
memcached_slabs_incr_hits | slabs_incr_hits | operations / second | Rate at which incrs commands modified this slab class |
memcached_slabs_decr_hits | slabs_decr_hits | operations / second | Rate at which decrs commands modified this slab class |
memcached_slabs_cas_hits | slabs_cas_hits | operations / second | Rate at which CAS commands modified this slab class |
memcached_slabs_cas_badval | slabs_cas_badval | keys / second | Rate at which CAS commands failed to modify a value due to a bad CAS ID |
memcached_slabs_touch_hits | slabs_touch_hits | operations / second | Rate of touches serviced by this slab class |
memcached_slabs_used_chunks_rate | slabs_used_chunks_rate | buffer / second | Rate at which chunks have been allocated to items |
memcached_slabs_chunk_size | slabs_chunk_size | bytes | Amount of space each chunk uses |
memcached_slabs_chunks_per_page | slabs_chunks_per_page | buffer | Chunks existing in one page |
memcached_slabs_total_pages | slabs_total_pages | page | Total number of pages allocated to the slab class |
memcached_slabs_total_chunks | slabs_total_chunks | buffer | Total number of chunks allocated to the slab class |
memcached_slabs_used_chunks | slabs_used_chunks | buffer | How many chunks have been allocated to items |
memcached_slabs_free_chunks | slabs_free_chunks | buffer | Chunks not yet allocated to items or freed via delete |
memcached_slabs_free_chunks_end | slabs_free_chunks_end | buffer | Number of free chunks at the end of the last allocated page |
memcached_slabs_mem_requested | slabs_mem_requested | bytes | Number of bytes requested to be stored in this slab |
memcached_slabs_active_slabs | slabs_active_slabs | occurance | Total number of slab classes allocated |
memcached_slabs_total_malloced | slabs_total_malloced | bytes | Total memory allocated to slab pages |