From 2c79d78be763c485f002ebfe5f20ef099e006298 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Tue, 24 Oct 2017 08:30:58 +0200 Subject: [PATCH] memcached plugin: Report "listen_disabled_num" as type "total_events". --- src/memcached.c | 9 +++++---- src/types.db | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/memcached.c b/src/memcached.c index d57a1d32..1cd5a301 100644 --- a/src/memcached.c +++ b/src/memcached.c @@ -523,7 +523,7 @@ static int memcached_read(user_data_t *user_data) { else if (FIELD_IS("curr_connections")) { submit_gauge("memcached_connections", "current", atof(fields[2]), st); } else if (FIELD_IS("listen_disabled_num")) { - submit_derive("operations", "listen_disabled", atoll(fields[2]), st); + submit_derive("total_events", "listen_disabled", atoll(fields[2]), st); } /* * Total number of connections opened since the server started running @@ -683,9 +683,10 @@ static int memcached_add_read_callback(memcached_t *st) { /* group = */ "memcached", /* name = */ callback_name, /* callback = */ memcached_read, - /* interval = */ 0, &(user_data_t){ - .data = st, .free_func = memcached_free, - }); + /* interval = */ 0, + &(user_data_t){ + .data = st, .free_func = memcached_free, + }); } /* int memcached_add_read_callback */ /* Configuration handling functiions diff --git a/src/types.db b/src/types.db index 577d28f1..4ca57aa7 100644 --- a/src/types.db +++ b/src/types.db @@ -245,6 +245,7 @@ time_ref value:GAUGE:0:U timeleft value:GAUGE:0:U total_bytes value:DERIVE:0:U total_connections value:DERIVE:0:U +total_events value:DERIVE:0:U total_objects value:DERIVE:0:U total_operations value:DERIVE:0:U total_requests value:DERIVE:0:U -- 2.30.2