What is the recommended way of getting "host specific" graphs into Ganglia?
I've been playing with adding support for this and came up with the following
solution: define a new template block "extra-host-specific", provided a file
host_extra_<FQDN>.php exists.
(see diff at end of this email).
(I'm using INCLUDESCRIPT, rather than INCLUDE, as I need to do some PHP
processing to build the pie-chart URL.)
One can include this block, just as with other TemplatePower (script) blocks.
If the host-specific file doesn't exist, the INCLUDESCRIPT fails, but that is
silent to the end-user.
I was wondering if:
1. I'm going about this the wrong way?
and
2. whether this patch (or something like it) should be included in the
web
pages by default?
This patch shouldn't affect any existing pages, but would allow a standard way
of including host-specific blocks; "out of the box", kinda.
Cheers,
Paul.
PS, those curious can see the (work-in-progress) results here:
http://svr031.gla.scotgrid.ac.uk/ganglia/?r=hour&c=Grid+Servers&h=svr018.gla.scotgrid.ac.uk
--- host_view.php.orig 2007-05-24 11:44:31.000000000 +0100
+++ host_view.php 2007-05-25 12:42:20.000000000 +0100
@@ -3,6 +3,11 @@
$tpl = new TemplatePower( template("host_view.tpl") );
$tpl->assignInclude("extra", template("host_extra.tpl"));
+$host_extra_filename = template("host_extra_${hostname}.php");
+if(file_exists($host_extra_filename))
+ {
+ $tpl->assignInclude("extra-host-specific", $host_extra_filename);
+ }
$tpl->prepare();
$tpl->assign("cluster", $clustername);
--- templates/default/host_view.tpl.orig 2007-05-24 11:46:01.000000000
+0100
+++ templates/default/host_view.tpl 2007-05-25 12:43:14.000000000 +0100
@@ -46,6 +46,7 @@
<HR>
<!-- INCLUDE BLOCK : extra -->
+<!-- INCLUDESCRIPT BLOCK : extra-host-specific -->
</TD>
pgpp1l0EWVATP.pgp
Description: PGP signature
------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/
_______________________________________________ Ganglia-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ganglia-developers
