From: skob Date: Tue, 28 Jun 2016 09:06:31 +0000 (+0400) Subject: Add slow queries statistics to mysql module X-Git-Tag: collectd-5.6.0~213^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=da6d306ee974de86487d268f14dba2cbd56a0ecf;p=collectd.git Add slow queries statistics to mysql module --- diff --git a/src/mysql.c b/src/mysql.c index a2394137..9b8d6cf3 100644 --- a/src/mysql.c +++ b/src/mysql.c @@ -904,6 +904,10 @@ static int mysql_read (user_data_t *ud) counter_submit ("mysql_sort", "scan", val, db); } + else if (strncmp (key, "Slow_queries", strlen ("Slow_queries")) == 0) + { + counter_submit ("mysql_slow_queries", NULL , val, db); + } } mysql_free_result (res); res = NULL; diff --git a/src/types.db b/src/types.db index e328a46a..77a9d06f 100644 --- a/src/types.db +++ b/src/types.db @@ -140,6 +140,7 @@ mysql_select value:DERIVE:0:U 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 nfs_procedure value:DERIVE:0:U nginx_connections value:GAUGE:0:U nginx_requests value:DERIVE:0:U