From: SK Date: Tue, 12 Mar 2019 20:26:17 +0000 (+0300) Subject: mysql: [impr] enable uptime metric X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=a77a6c9eb991868757530b672b90731607ee7cdd;p=collectd.git mysql: [impr] enable uptime metric --- diff --git a/src/mysql.c b/src/mysql.c index 7399fe21..54ffc9dd 100644 --- a/src/mysql.c +++ b/src/mysql.c @@ -905,6 +905,8 @@ static int mysql_read(user_data_t *ud) { } else if (strncmp(key, "Slow_queries", strlen("Slow_queries")) == 0) { derive_submit("mysql_slow_queries", NULL, val, db); + } else if (strncmp(key, "Uptime", strlen("Uptime")) == 0) { + gauge_submit("mysql_uptime", NULL, val, db); } } mysql_free_result(res); diff --git a/src/types.db b/src/types.db index 69f59b06..3f33ca73 100644 --- a/src/types.db +++ b/src/types.db @@ -165,6 +165,7 @@ mysql_sort value:DERIVE:0:U mysql_sort_merge_passes value:DERIVE:0:U mysql_sort_rows value:DERIVE:0:U mysql_slow_queries value:DERIVE:0:U +mysql_uptime value:GAUGE:0:4294967295 nfs_procedure value:DERIVE:0:U nginx_connections value:GAUGE:0:U nginx_requests value:DERIVE:0:U