On Wed, Jun 25, 2008 at 08:37:53AM -0700, Bernard Li wrote:
> On Wed, Jun 25, 2008 at 2:31 AM, Carlo Marcelo Arenas Belon
> <[EMAIL PROTECTED]> wrote:
> 
> > On Tue, Jun 24, 2008 at 11:20:34PM -0700, Bernard Li wrote:
> >> The code Jesse checked into trunk has introduced some formatting
> >> changes to graph titles that are still being sorted out.
> >
> > is there any other ganglia developer list I should be aware of? do you
> 
> I discussed this with Jesse on IRC.
> 
> > care to provide some specifics?
> 
> There is now a gap between "$clustername Cluster" and "$metric last
> $range" in the report graphs.

you mean the difference between :

  http://tapir.sajinet.com.pe/ganglia/png/ganglia-3.1-loadhour.png

and :

  http://tapir.sajinet.com.pe/ganglia/png/ganglia-3.2-loadhour.png

definitely I missed it, but wouldn't consider it as an "issue", after all
it is just 1 extra space which is a side effect of some old hack in the
graph.php code that overloaded the title for multiple $context and that could
be fixed by the following hack :

Index: graph.php
===================================================================
--- graph.php   (revision 1467)
+++ graph.php   (working copy)
@@ -182,7 +182,11 @@
 
 
 if ( preg_match('/_report/', $graph) ) {
-    $rrdtool_graph['title'] = "$title $hostname ". $rrdtool_graph['title'];
+    if ($context != 'host') {
+        $rrdtool_graph['title'] = "$title ". $rrdtool_graph['title'];
+    } else {
+        $rrdtool_graph['title'] = "$hostname ". $rrdtool_graph['title'];
+    }
 } else if (isset($title)) {
     $rrdtool_graph['title'] = "$title " . $rrdtool_graph['title'];
 }

and in any case shouldn't invalidate anything I said in my original post or
the proposed patch to reflect better what this style fixes for the hostname
used in the graphs are all about.

> > there is nothing wrong with doing it on each of the graph.d specific files
> > because this is not a "hostname conversion", but just a simple style
> > transformation, like deciding which title to use.
> 
> The issue I see here is code duplication -- if the place to determine
> whether to "transform" the hostname is in one place (conf.php), it
> makes no difference whether the code to do this transformation is in
> each graph or in ganglia.php as I suggested.

by that same argument, the code that decides which title to use (dependent 
in the context) for each graph, should be in graph.php as well.

but then the added complexity needed in order to manage that will offset the
code duplication, and the simplicity that is having all relevant parameters
for visualization changed in the local graph.d without side effects.

> >> Jesse mentioned that
> >> there are issue right now with $hostname being used as the file name
> >> for the .rrd file.  We should instead take this opportunity to
> >> implement a function to determine a UUID for the rrd filename (right
> >> now it will be $hosname).  This way we can kill two birds with one
> >> stone.
> >
> > this is just feature creep and unrelated to this issue.  it is also a very
> > bad design decision to generate an UUID when you have one already (the FQDN)
> 
> Can you please explain how this is a "feature creep"?  This issue is
> mentioned because Jesse said it can't be done in ganglia.php as the
> $hostname is being used as the basis for the directory name to store
> the rrd files.

that is the pure definition of "feature creep"; all that was needed is to
remove some extra characters after the first dot for the hostname, so that
it will (most likely) fit in the space that is being allocated for the graph.

now instead we are faced with a change that will require writing a generic
UUID handler so that the hostname that is printed in the graph, and the one
that is used to find which RRD to use are no longer one and the same.

see above my comment about added complexity and the fact that the issue at
hand (as stated by the subject) was just how to fix the graphs so they will be
readable, and Jesse solution was a KISS implementation for that.

> And am I missing something here?  I thought we were going to implement
> something to use UUID for the rrd directory:
> 
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg03919.html

yes, you are missing the fact that there is no UUID generated by the client
gmond and that the problem statement that was meant to fix was :

"the data for a host should be always be collected in the same RRD file,
regardless of changes in the interface being used (with different IPs for
multihomed boxes), the name associated with that IP, or maybe even the
hostname"

that has nothing to do with the problem that we are trying to solve here.

> And just the clarify, what I meant to say above is "$hostname being
> used as the directory name to store rrd files".

$hostname is only a good UUID if it is the FQDN and that precludes doing any
manipulations on it for formatting issues unless when done by the script that
generates the graph as Jesse explained.

Carlo

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to