summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6d86a97)
raw | patch | inline | side by side (parent: 6d86a97)
author | Florian Forster <octo@huhu.verplant.org> | |
Sat, 14 Mar 2009 17:02:35 +0000 (18:02 +0100) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Sat, 14 Mar 2009 17:02:35 +0000 (18:02 +0100) |
src/bind.c | patch | blob | history | |
src/types.db | patch | blob | history |
diff --git a/src/bind.c b/src/bind.c
index b464f8de64841f1b389a87e36eb85958db96018f..c0b18323651c719d56edbfc671194731a8901d0e 100644 (file)
--- a/src/bind.c
+++ b/src/bind.c
@@ -497,7 +497,7 @@ static int bind_parse_generic_name_value (const char *xpath_expression, /* {{{ *
list_callback_t list_callback,
void *user_data,
xmlDoc *doc, xmlXPathContext *xpathCtx,
- time_t current_time)
+ time_t current_time, int ds_type)
{
xmlXPathObject *xpathObj = NULL;
int num_entries;
@@ -545,7 +545,10 @@ static int bind_parse_generic_name_value (const char *xpath_expression, /* {{{ *
value_t value;
int status;
- status = bind_xml_read_counter (doc, counter, &value.counter);
+ if (ds_type == DS_TYPE_GAUGE)
+ status = bind_xml_read_gauge (doc, counter, &value.gauge);
+ else
+ status = bind_xml_read_counter (doc, counter, &value.counter);
if (status != 0)
continue;
list_info_ptr_t list_info =
{
plugin_instance,
- /* type = */ "dns_qtype"
+ /* type = */ "dns_qtype_gauge"
};
ssnprintf (plugin_instance, sizeof (plugin_instance), "%s-qtypes",
bind_parse_generic_name_value (/* xpath = */ "rdtype",
/* callback = */ bind_xml_list_callback,
/* user_data = */ &list_info,
- doc, path_ctx, current_time);
+ doc, path_ctx, current_time, DS_TYPE_COUNTER);
} /* }}} */
if (view->resolver_stats != 0) /* {{{ */
bind_parse_generic_name_value ("resstat",
/* callback = */ bind_xml_table_callback,
/* user_data = */ &table_ptr,
- doc, path_ctx, current_time);
+ doc, path_ctx, current_time, DS_TYPE_COUNTER);
} /* }}} */
if (view->cacherrsets != 0) /* {{{ */
list_info_ptr_t list_info =
{
plugin_instance,
- /* type = */ "dns_qtype"
+ /* type = */ "dns_qtype_gauge"
};
ssnprintf (plugin_instance, sizeof (plugin_instance), "%s-cache_rr_sets",
bind_parse_generic_name_value (/* xpath = */ "cache/rrset",
/* callback = */ bind_xml_list_callback,
/* user_data = */ &list_info,
- doc, path_ctx, current_time);
+ doc, path_ctx, current_time, DS_TYPE_GAUGE);
} /* }}} */
if (view->zones_num > 0)
bind_parse_generic_name_value (/* xpath = */ "server/requests/opcode",
/* callback = */ bind_xml_list_callback,
/* user_data = */ &list_info,
- doc, xpathCtx, current_time);
+ doc, xpathCtx, current_time, DS_TYPE_COUNTER);
}
/* XPath: server/queries-in/rdtype
bind_parse_generic_name_value (/* xpath = */ "server/queries-in/rdtype",
/* callback = */ bind_xml_list_callback,
/* user_data = */ &list_info,
- doc, xpathCtx, current_time);
+ doc, xpathCtx, current_time, DS_TYPE_COUNTER);
}
/* XPath: server/nsstats, server/nsstat
bind_parse_generic_name_value ("server/nsstat",
/* callback = */ bind_xml_table_callback,
/* user_data = */ &table_ptr,
- doc, xpathCtx, current_time);
+ doc, xpathCtx, current_time, DS_TYPE_COUNTER);
}
}
bind_parse_generic_name_value ("server/zonestat",
/* callback = */ bind_xml_table_callback,
/* user_data = */ &table_ptr,
- doc, xpathCtx, current_time);
+ doc, xpathCtx, current_time, DS_TYPE_COUNTER);
}
}
bind_parse_generic_name_value ("server/resstat",
/* callback = */ bind_xml_table_callback,
/* user_data = */ &table_ptr,
- doc, xpathCtx, current_time);
+ doc, xpathCtx, current_time, DS_TYPE_COUNTER);
}
}
diff --git a/src/types.db b/src/types.db
index 82b5b4f3c1f5128bfcafac092fbec1af55b83f82..6fc8e113a9c5f77f9b5eaa386af26536857b6775 100644 (file)
--- a/src/types.db
+++ b/src/types.db
disk_ops read:COUNTER:0:4294967295, write:COUNTER:0:4294967295
disk_time read:COUNTER:0:1000000, write:COUNTER:0:1000000
dns_answer value:COUNTER:0:65535
+dns_notify value:COUNTER:0:65535
dns_octets queries:COUNTER:0:125000000, responses:COUNTER:0:125000000
dns_opcode value:COUNTER:0:65535
dns_qtype value:COUNTER:0:65535
+dns_qtype_cached value:GAUGE:0:4294967295
+dns_query value:COUNTER:0:65535
dns_question value:COUNTER:0:65535
dns_rcode value:COUNTER:0:65535
+dns_reject value:COUNTER:0:65535
dns_request value:COUNTER:0:65535
dns_resolver value:COUNTER:0:65535
+dns_response value:COUNTER:0:65535
+dns_transfer value:COUNTER:0:65535
dns_update value:COUNTER:0:65535
dns_zops value:COUNTER:0:65535
-dns_notify value:COUNTER:0:65535
-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