Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More memcached metrics #185

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion memcached/conf.d/memcached.conf
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,24 @@ collection_group {
title = "Misses/sec"
value_threshold = 0
}

metric {
name = "mc_reclaimed"
title = "Number of times an entry was stored using memory from an expired entry"
value_threshold = 0
}
metric {
name = "mc_expired_unfetched"
title = "Items pulled from LRU that were never touched by get/incr/append/etc before expiring"
value_threshold = 0
}
metric {
name = "mc_evicted_unfetched"
title = "Items evicted from LRU that were never touched by get/incr/append/etc."
value_threshold = 0
}
metric {
name = "mc_crawler_reclaimed"
title = "Total items freed by LRU Crawler"
value_threshold = 0
}
}
21 changes: 20 additions & 1 deletion memcached/conf.d/memcached.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,24 @@ collection_group {
title = "Misses/sec"
value_threshold = 0
}

metric {
name = "mc_reclaimed"
title = "Number of times an entry was stored using memory from an expired entry"
value_threshold = 0
}
metric {
name = "mc_expired_unfetched"
title = "Items pulled from LRU that were never touched by get/incr/append/etc before expiring"
value_threshold = 0
}
metric {
name = "mc_evicted_unfetched"
title = "Items evicted from LRU that were never touched by get/incr/append/etc."
value_threshold = 0
}
metric {
name = "mc_crawler_reclaimed"
title = "Total items freed by LRU Crawler"
value_threshold = 0
}
}
28 changes: 28 additions & 0 deletions memcached/python_modules/memcached.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,30 @@ def metric_init(params):
"slope" : "both",
"description": "Number of valid items removed from cache to free memory for new items",
}))
descriptors.append(create_desc(Desc_Skel, {
"name" : mp+"_reclaimed",
"units" : "items",
"slope" : "both",
"description": "Number of times an entry was stored using memory from an expired entry",
}))
descriptors.append(create_desc(Desc_Skel, {
"name" : mp+"_expired_unfetched",
"units" : "items",
"slope" : "both",
"description": "Items pulled from LRU that were never touched by get/incr/append/etc before expiring",
}))
descriptors.append(create_desc(Desc_Skel, {
"name" : mp+"_evicted_unfetched",
"units" : "items",
"slope" : "both",
"description": "Items evicted from LRU that were never touched by get/incr/append/etc.",
}))
descriptors.append(create_desc(Desc_Skel, {
"name" : mp+"_crawler_reclaimed",
"units" : "items",
"slope" : "both",
"description": "Total items freed by LRU Crawler",
}))
descriptors.append(create_desc(Desc_Skel, {
"name" : mp+"_get_hits",
"units" : "items",
Expand Down Expand Up @@ -313,6 +337,10 @@ def metric_init(params):
mp+"_limit_maxbytes",
mp+"_curr_connections",
mp+"_evictions",
mp+"_reclaimed",
mp+"_expired_unfetched",
mp+"_evicted_unfetched",
mp+"_crawler_reclaimed",
]:
descriptors.remove(d)
for d in descriptors:
Expand Down