Code

Use generic types for a few more of the zookeeper metrics
authorJeremy Katz <jeremy@katzbox.net>
Fri, 28 Nov 2014 05:33:39 +0000 (00:33 -0500)
committerJeremy Katz <jeremy@katzbox.net>
Fri, 28 Nov 2014 05:33:39 +0000 (00:33 -0500)
src/types.db
src/zookeeper.c

index 2bf7a1725035bf4f9996fad5488dd85b9c8e3906..c9d6e1ae582bf001aeab83abea8cd567d347a017 100644 (file)
@@ -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
index e80ed4d216db016c74da0f591deeb8dffa9199ec..7f1ea33b0f91f167ebcaebb9d4ca3a059f45ca94 100644 (file)
@@ -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"))
                {