Skip to content

Memcached

·


Memcached collector can collect the running status metrics from Memcached instances, and collect the metrics to the Guance to help monitor and analyze various abnormal situations of Memcached.

Config

Preconditions

  • Memcached version >= 1.5.0. Already tested version:
    • 1.5.x
    • 1.6.x

Collector Configuration

Go to the conf.d/db directory under the DataKit installation directory, copy memcached.conf.sample and name it memcached.conf. Examples are as follows:

[[inputs.memcached]]
  ## Servers' addresses.
  servers = ["localhost:11211"]
  # unix_sockets = ["/var/run/memcached.sock"]

  ## Set true to enable election
  election = true

  ## Collect extra stats
  # extra_stats = ["slabs", "items"]

  ## Collect interval.
  # units: "ns", "us", "ms", "s", "m", "h"
  interval = "10s"

[inputs.memcached.tags]
  # some_tag = "some_value"
  # more_tag = "some_other_value"
  # ...

Once configured, restart DataKit.

The collector can now be turned on by ConfigMap Injection Collector Configuration.

Metric

For all of the following data collections, the global election tags will added automatically, we can add extra tags in [inputs.memcached.tags] if needed:

 [inputs.memcached.tags]
  # some_tag = "some_value"
  # more_tag = "some_other_value"
  # ...

memcached

  • Tags
Tag Description
server The host name from which metrics are gathered
  • Metrics
Metric Description
accepting_conns Whether or not server is accepting conns
Type: int
Unit: count
auth_cmds Number of authentication commands handled, success or failure
Type: int
Unit: count
auth_errors Number of failed authentications
Type: int
Unit: count
bytes Current number of bytes used to store items
Type: int
Unit: digital,B
bytes_read Total number of bytes read by this server from network
Type: int
Unit: digital,B
bytes_written Total number of bytes sent by this server to network
Type: int
Unit: digital,B
cas_badval Number of CAS for which a key was found, but the CAS value did not match
Type: int
Unit: count
cas_hits Number of successful CAS requests
Type: int
Unit: count
cas_misses Number of CAS requests against missing keys
Type: int
Unit: count
cmd_flush Cumulative number of flush requests
Type: int
Unit: count
cmd_get Cumulative number of retrieval requests
Type: int
Unit: count
cmd_set Cumulative number of storage requests
Type: int
Unit: count
cmd_touch Cumulative number of touch requests
Type: int
Unit: count
conn_yields Number of times any connection yielded to another due to hitting the -R limit
Type: int
Unit: count
connection_structures Number of connection structures allocated by the server
Type: int
Unit: count
curr_connections Number of open connections
Type: int
Unit: count
curr_items Current number of items stored
Type: int
Unit: count
decr_hits Number of successful decr requests
Type: int
Unit: count
decr_misses Number of decr requests against missing keys
Type: int
Unit: count
delete_hits Number of deletion requests resulting in an item being removed
Type: int
Unit: count
delete_misses umber of deletions requests for missing keys
Type: int
Unit: count
evicted_unfetched Items evicted from LRU that were never touched by get/incr/append/etc
Type: int
Unit: count
evictions Number of valid items removed from cache to free memory for new items
Type: int
Unit: count
expired_unfetched Items pulled from LRU that were never touched by get/incr/append/etc before expiring
Type: int
Unit: count
get_hits Number of keys that have been requested and found present
Type: int
Unit: count
get_misses Number of items that have been requested and not found
Type: int
Unit: count
hash_bytes Bytes currently used by hash tables
Type: int
Unit: digital,B
hash_is_expanding Indicates if the hash table is being grown to a new size
Type: int
Unit: count
hash_power_level Current size multiplier for hash table
Type: int
Unit: count
incr_hits Number of successful incr requests
Type: int
Unit: count
incr_misses Number of incr requests against missing keys
Type: int
Unit: count
limit_maxbytes Number of bytes this server is allowed to use for storage
Type: int
Unit: digital,B
listen_disabled_num Number of times server has stopped accepting new connections (maxconns)
Type: int
Unit: count
reclaimed Number of times an entry was stored using memory from an expired entry
Type: int
Unit: count
threads Number of worker threads requested
Type: int
Unit: count
total_connections Total number of connections opened since the server started running
Type: int
Unit: count
total_items Total number of items stored since the server started
Type: int
Unit: count
touch_hits Number of keys that have been touched with a new expiration time
Type: int
Unit: count
touch_misses Number of items that have been touched and not found
Type: int
Unit: count
uptime Number of secs since the server started
Type: int
Unit: count

memcached_items

  • Tags
Tag Description
server The host name from which metrics are gathered
slab_id The id of the current slab
  • Metrics
Metric Description
age Age of the oldest item in the LRU
Type: int
Unit: count
crawler_reclaimed Number of items which freed by the LRU Crawler
Type: int
Unit: count
direct_reclaims Number of worker threads which had to directly pull LRU tails to find memory for a new item
Type: int
Unit: count
evicted Number of the items which had to be evicted from the LRU before expiring
Type: int
Unit: count
evicted_nonzero Number of the onzero items which had an explicit expire time set had to be evicted from the LRU before expiring
Type: int
Unit: count
evicted_time Seconds since the last access for the most recent item evicted from this class
Type: int
Unit: time,s
evicted_unfetched Number of the valid items evicted from the LRU which were never touched after being set
Type: int
Unit: count
expired_unfetched Number of the expired items reclaimed from the LRU which were never touched after being set
Type: int
Unit: count
lrutail_reflocked Number of items which found to be refcount locked in the LRU tail
Type: int
Unit: count
moves_to_cold Number of items which were moved from HOT or WARM into COLD
Type: int
Unit: count
moves_to_warm Number of items which were moved from COLD to WARM
Type: int
Unit: count
moves_within_lru Number of active items which were bumped within HOT or WARM
Type: int
Unit: count
number Number of items presently stored in this slab class
Type: int
Unit: count
number_cold Number of items presently stored in the COLD LRU
Type: int
Unit: count
number_hot Number of items presently stored in the HOT LRU
Type: int
Unit: count
number_noexp Number of items presently stored in the NOEXP class
Type: int
Unit: count
number_warm Number of items presently stored in the WARM LRU
Type: int
Unit: count
outofmemory Number of the underlying slab class which was unable to store a new item
Type: int
Unit: count
reclaimed Number of entries which were stored using memory from an expired entry
Type: int
Unit: count
tailrepairs How many times memcache self-healed a slab with a refcount leak
Type: int
Unit: count

memcached_slabs

  • Tags
Tag Description
server The host name from which metrics are gathered
slab_id The id of the current slab
  • Metrics
Metric Description
active_slabs Total number of slab classes allocated
Type: int
Unit: count
cas_badval Number of CAS commands failed to modify a value due to a bad CAS id
Type: int
Unit: count
cas_hits Number of CAS commands modified this slab class
Type: int
Unit: count
chunk_size The amount of space each chunk uses
Type: int
Unit: digital,B
chunks_per_page How many chunks exist within one page
Type: int
Unit: count
cmd_set Number of set requests stored data in this slab class
Type: int
Unit: count
decr_hits Number of decrs commands modified this slab class
Type: int
Unit: count
delete_hits Number of delete commands succeeded in this slab class
Type: int
Unit: count
free_chunks Chunks not yet allocated to items or freed via delete
Type: int
Unit: count
free_chunks_end Number of free chunks at the end of the last allocated page
Type: int
Unit: count
get_hits Number of get requests were serviced by this slab class
Type: int
Unit: count
incr_hits Number of incrs commands modified this slab class
Type: int
Unit: count
total_chunks Total number of chunks allocated to the slab class
Type: int
Unit: count
total_malloced Total amount of memory allocated to slab pages
Type: int
Unit: digital,B
total_pages Total number of pages allocated to the slab class
Type: int
Unit: count
touch_hits Number of touches serviced by this slab class
Type: int
Unit: count
used_chunks How many chunks have been allocated to items
Type: int
Unit: count

Feedback

Is this page helpful? ×