Hi all,

I have a question which is mostly on documentation.

I'm interested in providing a multiple-series graph (similar to the ones at 
the top of a "host report" page) that combines multiple gmetric data.  I did 
have a brief look for docs on how to provide custom "nice" graphs, but didn't 
find anything.

In the past, someone presented some excellent work on providing ad-hoc 
multiple-series graphs.  What I'd like is similar, but I'd like the graph to 
be permanent, just like with the "Load" and "Memory" graphs.

Believing it must be possible, I had a go; I got it to work (more or less), 
but had to alter one of the "core" PHP file.   In brief, I altered 
templates/default/host_view.tpl to include an extra image with a new graph 
type (URL was graph.php?g=<name>_report&...) and hacked graph.php to include 
this new graph type.

The end result can be seen here:
  http://grid04.ph.gla.ac.uk/ganglia/?c=Test%20cluster&h=ppepc65.ph.gla.ac.uk
(top right, entitled "ppepc65.ph.gla.ac.uk Apache last hour")

Problems with this:
  1.  Its a bit ugly: I'm having to edit graph.php, rather than specifying the 
new graph within a template.

  2.  I'd like to be able to choose whether the new graph to appear on a 
per-node basis (the template tries to load the new graph for all nodes).

  3.  It doesn't seem to be documented anywhere (I'd like to know I'm doing 
this correctly :-)

In practise, 2 isn't too great a problem: looking at graph.php?g=apache_report 
on a node without the relevant gmetric data returns only a single 
charage-return, so firefox displays nothing.  It would be nicer to be able to 
switch off the image for nodes that don't have that data.

So,

1. Is there a best-practise way of doing this?
2. If not, how should I document this for people?

Cheers,

Paul.

Attachment: pgpklcHr2KH2n.pgp
Description: PGP signature

Reply via email to