diff --git a/src/powerdns.c b/src/powerdns.c
index c8e72cbff8965f0d886a328937618ec2fbb7a58a..7b7cab39ddd62580b9e45fe28caf92b871b2822e 100644 (file)
--- a/src/powerdns.c
+++ b/src/powerdns.c
*
* Author:
* Luke Heberling <lukeh at c-ware.com>
- * Florian Forster <octo at verplant.org>
+ * Florian Forster <octo at collectd.org>
*
* DESCRIPTION
* Queries a PowerDNS control socket for statistics
{"recursing-questions", "dns_question", "recurse"},
{"tcp-queries", "dns_question", "tcp"},
{"udp-queries", "dns_question", "udp"},
+ {"rd-queries", "dns_question", "rd"},
/* Answers */
{"recursing-answers", "dns_answer", "recurse"},
{"tcp-answers", "dns_answer", "tcp"},
{"udp-answers", "dns_answer", "udp"},
+ {"recursion-unanswered", "dns_answer", "recursion-unanswered"},
+ {"udp-answers-bytes", "total_bytes", "udp-answers-bytes"},
/* Cache stuff */
{"packetcache-hit", "cache_result", "packet-hit"},
{"packetcache-miss", "cache_result", "packet-miss"},
{"packetcache-size", "cache_size", "packet"},
+ {"key-cache-size", "cache_size", "key"},
+ {"meta-cache-size", "cache_size", "meta"},
+ {"signature-cache-size", "cache_size", "signature"},
{"query-cache-hit", "cache_result", "query-hit"},
{"query-cache-miss", "cache_result", "query-miss"},
/* Latency */
{"latency", "latency", NULL},
+ /* DNS updates */
+ {"dnsupdate-answers", "dns_answer", "dnsupdate-answer"},
+ {"dnsupdate-changes", "dns_question", "dnsupdate-changes"},
+ {"dnsupdate-queries", "dns_question", "dnsupdate-queries"},
+ {"dnsupdate-refused", "dns_answer", "dnsupdate-refused"},
+
/* Other stuff.. */
{"corrupt-packets", "ipt_packets", "corrupt"},
{"deferred-cache-inserts", "counter", "cache-deferred_insert"},
{"udp4-queries", "dns_question", "queries-udp4"},
{"udp6-answers", "dns_answer", "udp6"},
{"udp6-queries", "dns_question", "queries-udp6"},
+ {"security-status", "dns_question", "security-status"},
+ {"udp-do-queries", "dns_question", "udp-do_queries"},
+ {"signatures", "counter", "signatures"},
/***********************
* Recursor statistics *
{"throttle-entries", "gauge", "entries-throttle"},
{"unauthorized-tcp", "counter", "denied-unauthorized_tcp"},
{"unauthorized-udp", "counter", "denied-unauthorized_udp"},
- {"unexpected-packets", "dns_answer", "unexpected"}
- /* {"uptime", "", ""} */
+ {"unexpected-packets", "dns_answer", "unexpected"},
+ {"uptime", "uptime", NULL}
}; /* }}} */
int lookup_table_length = STATIC_ARRAY_SIZE (lookup_table);
if (ds->ds_num != 1)
{
- ERROR ("powerdns plugin: type `%s' has %i data sources, "
+ ERROR ("powerdns plugin: type `%s' has %zu data sources, "
"but I can only handle one.",
type, ds->ds_num);
return;
return (-1);
}
buffer[sizeof (buffer) - 1] = 0;
- int i = strlen (buffer);
- if (i < sizeof (buffer) - 2)
+ size_t len = strlen (buffer);
+ if (len < sizeof (buffer) - 2)
{
- buffer[i++] = ' ';
- buffer[i++] = '\n';
- buffer[i++] = '\0';
+ buffer[len++] = ' ';
+ buffer[len++] = '\n';
+ buffer[len++] = '\0';
}
}