Code

powerdns plugin: Completed the list of values for the authorative server.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Wed, 30 Apr 2008 17:43:32 +0000 (19:43 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Wed, 30 Apr 2008 17:43:32 +0000 (19:43 +0200)
Also added a TODO comment that should be resolved before releasing 4.4.

TODO
src/powerdns.c

diff --git a/TODO b/TODO
index 2a5b7ca40dc6591d18075c691c96741bb1c390b8..08fcec1ee70c568810959e445cf103bc669348a4 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,3 +1,6 @@
+For version 4.4:
+* PowerDNS plugin
+
 For version 4.3:
 * unixsock plugin: Remove the custom cache if possible.
 
index 9caa77086535de7352dbad1c8368b0967c23d665..5a4ccf8aca54981dfa2fdfead526774c6803ae68 100644 (file)
@@ -121,44 +121,45 @@ user-msec           number of CPU milliseconds spent in 'user' mode
 
 statname_lookup_t lookup_table[] = /* {{{ */
 {
-  /*
-   * Recursor statistics
-   */
-  /*
-   * corrupt-packets
-   * deferred-cache-inserts
-   * deferred-cache-lookup
-   * qsize-q
-   * servfail-packets
-   * timedout-packets
-   * udp4-answers
-   * udp4-queries
-   * udp6-answers
-   * udp6-queries
-   */
+  /*********************
+   * Server statistics *
+   *********************/
   /* Questions */
-  {"recursing-questions", "dns_question", "recurse"},
-  {"tcp-queries",         "dns_question", "tcp"},
-  {"udp-queries",         "dns_question", "udp"},
+  {"recursing-questions",    "dns_question", "recurse"},
+  {"tcp-queries",            "dns_question", "tcp"},
+  {"udp-queries",            "dns_question", "udp"},
 
   /* Answers */
-  {"recursing-answers",   "dns_answer",   "recurse"},
-  {"tcp-answers",         "dns_answer",   "tcp"},
-  {"udp-answers",         "dns_answer",   "udp"},
+  {"recursing-answers",      "dns_answer",   "recurse"},
+  {"tcp-answers",            "dns_answer",   "tcp"},
+  {"udp-answers",            "dns_answer",   "udp"},
 
   /* Cache stuff */
-  {"packetcache-hit",     "cache_result", "packet-hit"},
-  {"packetcache-miss",    "cache_result", "packet-miss"},
-  {"packetcache-size",    "cache_size",   "packet"},
-  {"query-cache-hit",     "cache_result", "query-hit"},
-  {"query-cache-miss",    "cache_result", "query-miss"},
+  {"packetcache-hit",        "cache_result", "packet-hit"},
+  {"packetcache-miss",       "cache_result", "packet-miss"},
+  {"packetcache-size",       "cache_size",   "packet"},
+  {"query-cache-hit",        "cache_result", "query-hit"},
+  {"query-cache-miss",       "cache_result", "query-miss"},
 
   /* Latency */
-  {"latency",             "latency",      NULL},
-
-  /*
-   * Recursor statistics
-   */
+  {"latency",                "latency",      NULL},
+
+  /* Other stuff.. */
+  {"corrupt-packets",        "io_packets",   "corrupt"},
+  {"deferred-cache-inserts", "counter",      "cache-deferred_insert"},
+  {"deferred-cache-lookup",  "counter",      "cache-deferred_lookup"},
+  {"qsize-a",                "cache_size",   "answers"},
+  {"qsize-q",                "cache_size",   "questions"},
+  {"servfail-packets",       "io_packets",   "servfail"},
+  {"timedout-packets",       "io_packets",   "timeout"},
+  {"udp4-answers",           "dns_answer",   "udp4"},
+  {"udp4-queries",           "dns_question", "queries-udp4"},
+  {"udp6-answers",           "dns_answer",   "udp6"},
+  {"udp6-queries",           "dns_question", "queries-udp6"},
+
+  /***********************
+   * Recursor statistics *
+   ***********************/
   /* Answers by return code */
   {"noerror-answers",     "dns_rcode",    "NOERROR"},
   {"nxdomain-answers",    "dns_rcode",    "NXDOMAIN"},
@@ -178,6 +179,8 @@ statname_lookup_t lookup_table[] = /* {{{ */
 
   /* Total number of questions.. */
   {"questions",           "dns_qtype",    "total"}
+
+  /* TODO: Add all recursor metrics here */
 }; /* }}} */
 int lookup_table_length = STATIC_ARRAY_SIZE (lookup_table);
 
@@ -186,6 +189,18 @@ static llist_t *list = NULL;
 #define PDNS_LOCAL_SOCKPATH LOCALSTATEDIR"/run/"PACKAGE_NAME"-powerdns"
 static char *local_sockpath = NULL;
 
+/* TODO: Do this before 4.4:
+ * - Make list of ``interesting values'' configurable
+ * - Authorative server:
+ *   - Store each element in a list or an array
+ *   - Check values returned by `SHOW *' against that list.
+ * - Recursor:
+ *   - Use the list to build a command to request the given values
+ *   - Complete list of known pdns -> collectd mappings.
+ *
+ * -octo
+ */
+
 /* <http://doc.powerdns.com/recursor-stats.html> */
 static void submit (const char *plugin_instance, /* {{{ */
     const char *pdns_type, const char *value)