[collectd] [Patch 2/3] php-collection: graph definition improvements for bind plugin

Bruno Prémont bonbons at linux-vserver.org
Mon Apr 20 22:36:12 CEST 2009


Add new dns_qtype_cached type for metagraph and switch memory metagraph
to line-based for bind plugin as the values from bind plugin are not
cumulative.
---
 contrib/php-collection/definitions.php |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/contrib/php-collection/definitions.php b/contrib/php-collection/definitions.php
index cb3e803..8f98ce8 100644
--- a/contrib/php-collection/definitions.php
+++ b/contrib/php-collection/definitions.php
@@ -1578,6 +1578,7 @@ function load_graph_definitions($logarithmic = false, $tinylegend = false) {
 	$MetaGraphDefs['tcp_connections']   = 'meta_graph_tcp_connections';
 	$MetaGraphDefs['dns_opcode']        = 'meta_graph_dns_event';
 	$MetaGraphDefs['dns_qtype']         = 'meta_graph_dns_event';
+	$MetaGraphDefs['dns_qtype_cached']  = 'meta_graph_dns_event';
 	$MetaGraphDefs['dns_rcode']         = 'meta_graph_dns_event';
 	$MetaGraphDefs['dns_request']       = 'meta_graph_dns_event';
 	$MetaGraphDefs['dns_resolver']      = 'meta_graph_dns_event';
@@ -1745,7 +1746,10 @@ function meta_graph_memory($host, $plugin, $plugin_instance, $type, $type_instan
 		$sources[] = array('name'=>$inst, 'file'=>$file);
 	}
 
-	return collectd_draw_meta_stack($opts, $sources);
+	if ($plugin == 'bind')
+		return collectd_draw_meta_line($opts, $sources);
+	else
+		return collectd_draw_meta_stack($opts, $sources);
 }
 
 function meta_graph_vs_threads($host, $plugin, $plugin_instance, $type, $type_instances, $opts = array()) {
-- 
1.6.0.6




More information about the collectd mailing list