Merge pull request #1770 from swt2c/smart_ignore_sleep
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Fri, 15 Jul 2016 14:03:15 +0000 (16:03 +0200)
committerGitHub <noreply@github.com>
Fri, 15 Jul 2016 14:03:15 +0000 (16:03 +0200)
smart plugin: add IgnoreSleepMode option to ignore sleeping disks

contrib/redhat/collectd.spec
src/mysql.c
src/types.db

index b6d709e..bf9b320 100644 (file)
@@ -781,7 +781,7 @@ using HTTP POST requests.
 Summary:       Write-kafka plugin for collectd
 Group:         System Environment/Daemons
 Requires:      %{name}%{?_isa} = %{version}-%{release}
-BuildRequires: rdkafka-devel
+BuildRequires: librdkafka-devel
 %description write_kafka
 The write_kafka plugin sends values to kafka, a distributed messaging system.
 %endif
index a239413..9b8d6cf 100644 (file)
@@ -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;
 
index e328a46..77a9d06 100644 (file)
@@ -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