As some may know I have been playing with the rewrite of Ganglia web
frontend. I have come up with a better of way IMO of handling optional
graphs. Basically the way I have it implemented is that there is a conf/
directory within Ganglia (writeable by Apache user) which contains JSON
definitions of optional graphs to include/exclude/ignore. Currently I have
it implemented in such a way that there is a default JSON file that looks
like this

{
        "included_reports":
["load_report","mem_report","cpu_report","network_report","packet_report"]
}

and override per host file that looks something like this

{"excluded_reports":["mem_report","network_report","packet_report"]}

So for this particular host only load_report and cpu_report would show
since the other three have been excluded from default. 

You can look at a live example here

http://ec2-184-72-167-114.compute-1.amazonaws.com/ganglia-new/?c=unspecified&h=ip-10-122-222-96.ec2.internal&m=cpu_report&r=hour&s=descending&hc=4&mc=2

I haven't implemented optional graphs for clusters but it wouldn't be hard
to do. If you want to play with the changes most of the changes are here

http://github.com/vvuksan/ganglia-misc/tree/master/ganglia-web/

Should be a drop in replacement. Only thing to make sure is that conf/
directory is writeable by Apache.

Vladimir


On Tue, 2 Nov 2010 15:04:22 -0700, Bernard Li <[email protected]> wrote:
> Hi Jamie:
> 
> On Fri, Oct 15, 2010 at 4:49 PM, Bernard Li <[email protected]> wrote:
> 
>> Actually, why don't you hold off on uploading another patch until
>> after me and perhaps Jesse have time to fully test it, that case we
>> will be able to give you better feedback so you don't have to go
>> through this incremental patching business.
> 
> Sorry for the delayed response, here are some additional comments:
> 
> 1) As previously mentioned, please make the old-style optional graphs
> to show up in cluster_view only
> 2) For grid page, can you just tag the optional graph after the
> default graphs for the grid?  The title of the graph only shows "Grid"
> without the actual name of the grid.
> 3) For host page, it looks like even if you choose "false", the
> optional graph still shows up -- probably an artifact for supporting
> the old-style optional graphs -- also is it possible to have the graph
> show up following the rest of the graphs on the right hand side
> (instead of on the left hand side)?
> 4) Report an error if user specified a rrd file that does not exist
> 5) With the following in conf.php:
> 
> $optional_graphs = array('packet' => array('pkts_+', false, true,
true));
> 
> It gave a bunch of error messages like:
> 
> [Tue Nov 02 15:01:12 2010] [error] [client 192.168.1.12] PHP Notice:
> Undefined index:   in
> /var/www/html/ganglia.trunk.vanilla/web/functions.php on line 219,
> referer:
>
http://server01/ganglia.trunk.vanilla/web/?m=load_one&r=hour&s=descending&hc=4&mc=2
> [Tue Nov 02 15:01:12 2010] [error] [client 192.168.1.12] PHP Warning:
> array_key_exists() [<a
> href='function.array-key-exists'>function.array-key-exists</a>]: The
> second argument should be either an array or an object in
> /var/www/html/ganglia.trunk.vanilla/web/functions.php on line 219,
> referer:
>
http://server01/ganglia.trunk.vanilla/web/?m=load_one&r=hour&s=descending&hc=4&mc=2


------------------------------------------------------------------------------
Achieve Improved Network Security with IP and DNS Reputation.
Defend against bad network traffic, including botnets, malware, 
phishing sites, and compromised hosts - saving your company time, 
money, and embarrassment.   Learn More! 
http://p.sf.net/sfu/hpdev2dev-nov
_______________________________________________
Ganglia-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ganglia-general

Reply via email to