Code

memcached plugin: Add delete_{hits,misses} metrics.
authortheairkit <theairkit@gmail.com>
Thu, 1 Dec 2016 14:22:45 +0000 (17:22 +0300)
committerFlorian Forster <octo@collectd.org>
Thu, 18 May 2017 07:39:23 +0000 (09:39 +0200)
src/memcached.c

index 5933bd480c1319d493514d6f8fad56e7e0acfe31..627dc85ff0d6e463b78c9a47091c2e44b4ccdd22 100644 (file)
@@ -412,8 +412,10 @@ static int memcached_read(user_data_t *user_data) {
     }
 
     /*
-     * Operations on the cache, i. e. cache hits, cache misses and evictions of
-     * items
+     * Operations on the cache:
+     * - get hits/misses
+     * - delete hits/misses
+     * - evictions
      */
     else if (FIELD_IS("get_hits")) {
       submit_derive("memcached_ops", "hits", atoll(fields[2]), st);
@@ -422,6 +424,10 @@ static int memcached_read(user_data_t *user_data) {
       submit_derive("memcached_ops", "misses", atoll(fields[2]), st);
     } else if (FIELD_IS("evictions")) {
       submit_derive("memcached_ops", "evictions", atoll(fields[2]), st);
+    } else if (FIELD_IS("delete_hits")) {
+      submit_derive("memcached_ops", "del_hits", atoll(fields[2]), st);
+    } else if (FIELD_IS("delete_misses")) {
+      submit_derive("memcached_ops", "del_misses", atoll(fields[2]), st);
     }
 
     /*