From 6372ca6a38b09305da1ced06fbaacf85b21a878a Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Fri, 28 Nov 2014 00:33:39 -0500 Subject: [PATCH] Use generic types for a few more of the zookeeper metrics --- src/types.db | 2 -- src/zookeeper.c | 12 ++++++------ 2 files changed, 6 insertions(+), 8 deletions(-) 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")) { -- 2.30.2