From: Pavel Rochnyack Date: Sun, 19 May 2019 17:30:32 +0000 (+0700) Subject: memcached plugin: Report uptime metric X-Git-Tag: 5.10.0~41^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3160%2Fhead;p=thirdparty%2Fcollectd.git memcached plugin: Report uptime metric Issue: #2852 --- diff --git a/src/memcached.c b/src/memcached.c index 0baf6c221..eb804d1dd 100644 --- a/src/memcached.c +++ b/src/memcached.c @@ -508,6 +508,13 @@ static int memcached_read(user_data_t *user_data) { submit_gauge("memcached_items", "current", atof(fields[2]), st); } + /* + * Number of secs since the server started + */ + else if (FIELD_IS("uptime")) { + submit_gauge("uptime", NULL, atof(fields[2]), st); + } + /* * Number of bytes used and available (total - used) */