summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 61f9a80)
raw | patch | inline | side by side (parent: 61f9a80)
author | Bruno Prémont <bonbons@linux-vserver.org> | |
Thu, 19 Feb 2009 08:42:05 +0000 (09:42 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Thu, 19 Feb 2009 08:42:05 +0000 (09:42 +0100) |
On Mon, 16 February 2009 Florian Forster wrote:
> The new plugins are:
>
> * BIND: Name-server and zone statistics
A few bugs are hidden there, attached is a patch that fixes most
of those I've discovered untils now.
- Url parameter never considered
- missing type definition for dns_reject
- MemoryStats is linked to the wrong variable
(TODO: memory stats seem not to work, probably dispatch_counter()
for gauge value ...)
- SOAOutv6 should be translated to SOA-IPv6 instead of SOA-IPv4
in order to be saved correctly and not cause timestamp collisions
Bruno
> The new plugins are:
>
> * BIND: Name-server and zone statistics
A few bugs are hidden there, attached is a patch that fixes most
of those I've discovered untils now.
- Url parameter never considered
- missing type definition for dns_reject
- MemoryStats is linked to the wrong variable
(TODO: memory stats seem not to work, probably dispatch_counter()
for gauge value ...)
- SOAOutv6 should be translated to SOA-IPv6 instead of SOA-IPv4
in order to be saved correctly and not cause timestamp collisions
Bruno
src/bind.c | patch | blob | history | |
src/types.db | patch | blob | history |
diff --git a/src/bind.c b/src/bind.c
index 8e785d98004f4be270a12b5a4979076468eb83a0..bb3496ca464a031c6408885375145d0d597b6be3 100644 (file)
--- a/src/bind.c
+++ b/src/bind.c
{ "NotifyRej", "dns_notify", "rejected" },
/* SOA/AXFS/IXFS requests */
{ "SOAOutv4", "dns_opcode", "SOA-IPv4" },
- { "SOAOutv6", "dns_opcode", "SOA-IPv4" },
+ { "SOAOutv6", "dns_opcode", "SOA-IPv6" },
{ "AXFRReqv4", "dns_opcode", "AXFR-IPv4" },
{ "AXFRReqv6", "dns_opcode", "AXFR-IPv6" },
{ "IXFRReqv4", "dns_opcode", "IXFR-IPv4" },
{
oconfig_item_t *child = ci->children + i;
- if (strcasecmp ("OpCodes", child->key) == 0)
+ if (strcasecmp ("Url", child->key) == 0) {
+ if ((child->values_num != 1) || (child->values[0].type != OCONFIG_TYPE_STRING))
+ {
+ WARNING ("bind plugin: The `Url' option needs "
+ "exactly one string argument.");
+ return (-1);
+ }
+
+ url = strdup (child->values[0].value.string);
+ } else if (strcasecmp ("OpCodes", child->key) == 0)
bind_config_set_bool ("OpCodes", &global_opcodes, child);
else if (strcasecmp ("QTypes", child->key) == 0)
bind_config_set_bool ("QTypes", &global_qtypes, child);
else if (strcasecmp ("ResolverStats", child->key) == 0)
bind_config_set_bool ("ResolverStats", &global_resolver_stats, child);
else if (strcasecmp ("MemoryStats", child->key) == 0)
- bind_config_set_bool ("MemoryStats", &global_resolver_stats, child);
+ bind_config_set_bool ("MemoryStats", &global_memory_stats, child);
else if (strcasecmp ("View", child->key) == 0)
bind_config_add_view (child);
else
diff --git a/src/types.db b/src/types.db
index 6d0153236aecbec0759781cdf30266fbc0dbb806..82b5b4f3c1f5128bfcafac092fbec1af55b83f82 100644 (file)
--- a/src/types.db
+++ b/src/types.db
dns_transfer value:COUNTER:0:65535
dns_query value:COUNTER:0:65535
dns_response value:COUNTER:0:65535
+dns_reject value:COUNTER:0:65535
email_check value:GAUGE:0:U
email_count value:GAUGE:0:U
email_size value:GAUGE:0:U