I patched cluster_view.php to allow you to do something like this in conf.php:
# Optional summary graphs for specific clusters
$cluster_graphs = array(
'MTA' => array('postfix_q','postfix_log'),
'Web' => array('httpd')
);
When you view one of the named clusters, you will see the custom graph
named in the array in the "Overview" section, with aggregate data.
You'll also see all of the $optional_graphs in every cluster overview.
Unfortunately, just like with $optional_graphs, the graphs must have
names ending in _report, and you drop the _report off the name you put
in the $cluster_graphs array. Annoying for two reasons:
1. I used to think $optional_graphs didn't work, because I put full graph
names in the array, and there was no documentation saying otherwise.
2. I've defined several custom graphs that don't end in _report and
already have them plugged into my custom viewing interface, and
bookmarked by several people here, so now I have to maintain
two of each of these graphs.
(Can't even symlink since the graph name is in the code)
Anyway, diffs below. I'd have preferred to make this read from a
separate config file in /etc/ganglia rather than be in conf.php
directly, but I loathe php so I won't write more of it than I need to :)
-- Cos
*** cluster_view.php 2008/09/19 17:23:55 1.1
--- cluster_view.php 2008/09/19 17:56:57
***************
*** 50,55 ****
--- 50,56 ----
#
$graph_args =
"c=$cluster_url&$get_metric_string&st=$cluster[LOCALTIME]";
$tpl->assign("graph_args", $graph_args);
+
if (!isset($optional_graphs))
$optional_graphs = array();
foreach ($optional_graphs as $g) {
***************
*** 59,64 ****
--- 60,75 ----
$tpl->gotoBlock('_ROOT');
}
+ if (isset($cluster_graphs[$clustername]))
+ { $cgraphs = $cluster_graphs[$clustername];
+ foreach ($cgraphs as $g) {
+ $tpl->newBlock('optional_graphs');
+ $tpl->assign('name',$g);
+ $tpl->assign('graph_args',$graph_args);
+ $tpl->gotoBlock('_ROOT');
+ }
+ }
+
#
# Correctly handle *_report cases and blank (" ") units
#
***************
*** 249,252 ****
$tpl->printToScreen();
?>
-
--- 260,262 ----
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ganglia-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ganglia-general