From: Jeremy Katz Date: Fri, 28 Nov 2014 05:33:39 +0000 (-0500) Subject: Use generic types for a few more of the zookeeper metrics X-Git-Tag: collectd-5.5.0~116^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6372ca6a38b09305da1ced06fbaacf85b21a878a;p=collectd.git Use generic types for a few more of the zookeeper metrics --- diff --git a/src/types.db b/src/types.db index 2bf7a172..c9d6e1ae 100644 --- a/src/types.db +++ b/src/types.db @@ -23,7 +23,6 @@ connections value:DERIVE:0:U conntrack value:GAUGE:0:4294967295 contextswitch value:DERIVE:0:U count value:GAUGE:0:U -counter value:COUNTER:U:U cpufreq value:GAUGE:0:U cpu value:DERIVE:0:U current_connections value:GAUGE:0:U @@ -222,7 +221,6 @@ voltage value:GAUGE:U:U vs_memory value:GAUGE:0:9223372036854775807 vs_processes value:GAUGE:0:65535 vs_threads value:GAUGE:0:65535 -zk_approximate_data_size value:GAUGE:0:U # # Legacy types diff --git a/src/zookeeper.c b/src/zookeeper.c index e80ed4d2..7f1ea33b 100644 --- a/src/zookeeper.c +++ b/src/zookeeper.c @@ -272,27 +272,27 @@ static int zookeeper_read (void) { } else if (FIELD_CHECK (fields[0], "zk_znode_count")) { - zookeeper_submit_gauge ("count", "znode", atol(fields[1])); + zookeeper_submit_gauge ("gauge", "znode", atol(fields[1])); } else if (FIELD_CHECK (fields[0], "zk_watch_count")) { - zookeeper_submit_gauge ("count", "watch", atol(fields[1])); + zookeeper_submit_gauge ("gauge", "watch", atol(fields[1])); } else if (FIELD_CHECK (fields[0], "zk_ephemerals_count")) { - zookeeper_submit_gauge ("count", "ephemerals", atol(fields[1])); + zookeeper_submit_gauge ("gauge", "ephemerals", atol(fields[1])); } else if (FIELD_CHECK (fields[0], "zk_ephemerals_count")) { - zookeeper_submit_gauge ("count", "ephemerals", atol(fields[1])); + zookeeper_submit_gauge ("gauge", "ephemerals", atol(fields[1])); } else if (FIELD_CHECK (fields[0], "zk_ephemerals_count")) { - zookeeper_submit_gauge ("count", "ephemerals", atol(fields[1])); + zookeeper_submit_gauge ("gauge", "ephemerals", atol(fields[1])); } else if (FIELD_CHECK (fields[0], "zk_approximate_data_size")) { - zookeeper_submit_gauge ("zk_approximate_data_size", NULL, atol(fields[1])); + zookeeper_submit_gauge ("bytes", "approximate_data_size", atol(fields[1])); } else if (FIELD_CHECK (fields[0], "zk_followers")) {