From: Wilson Felipe Date: Mon, 4 Feb 2013 19:31:11 +0000 (-0800) Subject: mysql plugin: adding select and sort counters X-Git-Tag: collectd-5.5.0~229^2~2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=7d1ee33e6e2250ab6c52be935c897ad8141fdea4;p=collectd.git mysql plugin: adding select and sort counters --- diff --git a/src/mysql.c b/src/mysql.c index df1e7b67..0f8d5a64 100644 --- a/src/mysql.c +++ b/src/mysql.c @@ -738,6 +738,20 @@ static int mysql_read (user_data_t *ud) else if (strcmp (key, "Innodb_rows_updated") == 0) counter_submit ("mysql_innodb_rows", "updated", val, db); } + else if (strncmp (key, "Select_", + strlen ("Select_")) == 0) + { + counter_submit ("mysql_select", + key + strlen ("Select_"), + val, db); + } + else if (strncmp (key, "Sort_", + strlen ("Sort_")) == 0) + { + counter_submit ("mysql_sort", + key + strlen ("Sort_"), + val, db); + } } mysql_free_result (res); res = NULL; diff --git a/src/types.db b/src/types.db index e24a78c0..fb951421 100644 --- a/src/types.db +++ b/src/types.db @@ -110,6 +110,8 @@ mysql_bpool_counters value:DERIVE:0:U mysql_innodb_data value:DERIVE:0:U mysql_innodb_dblwr value:DERIVE:0:U mysql_innodb_rows value:DERIVE:0:U +mysql_select value:DERIVE:0:U +mysql_sort value:DERIVE:0:U nfs_procedure value:DERIVE:0:U nginx_connections value:GAUGE:0:U nginx_requests value:DERIVE:0:U