[Ganglia-general] optional graph processing - possible bug?
It's my understanding that if I have the following in conf.php: $conf['optional_cluster_graphs_for_host_view'] = false; and I have no host-level optional graphs (i.e. all set to 'ignored') and I enable an optional graph at the cluster level then I should not see the graph at the host level. Unfortunately, that's not the case; I do see it. Poking around in the code it looks like getOptionalReports() in host_view.php is (subject to some conditions) including the cluster_.json file twice, first time only if $conf['optional_cluster_graphs_for_host_view'] is true and the second time if a host_.json file does not exist. It could well be that my understanding is wrong or I have not considered some combination of circumstances, but if all that is okay then here's a patch (which also removes an nearby near duplicate definition of $cluster_file): --- host_view.php.orig 2015-09-30 15:26:59.259677153 +0200 +++ host_view.php 2015-09-30 16:02:23.534041873 +0200 @@ -92,9 +92,8 @@ $override_reports = array_merge( $override_reports, json_decode(file_get_contents($host_file), TRUE)); - } else { + } elseif ($conf['optional_cluster_graphs_for_host_view']) { // If there is no host file, look for a default cluster file -$cluster_file = $conf['conf_dir'] . "/cluster_" . $clustername . ".json"; if ( is_file($cluster_file) ) { $override_reports = array_merge( $override_reports, (That's a patch against the version on github, which is the same as my system.) HTH Alexis <>-- ___ Ganglia-general mailing list Ganglia-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ganglia-general
Re: [Ganglia-general] per-cluster authorization
In case anybody else gets caught by this ... > From the 'grid --> choose a source' pulldown menu I select one of my two > clusters > but get a simple page stating "Sorry, you do not have access to this > resource." After an eventual visit to #apache, I replaced the suggested with and it now works. My /etc/httpd/conf.d/ganglia.conf now contains: Alias /ganglia /usr/share/ganglia SetEnv ganglia_secret x Require all granted # Last match is used, so important that restricted page is # placed after unrestricted pages. See AuthType Basic AuthName "Ganglia Access" AuthUserFile /var/lib/ganglia/htpasswd Require valid-user Credit to Unbeliever and Spiceman on Freenode's #apache. Alexis -- Monitor Your Dynamic Infrastructure at Any Scale With Datadog! Get real-time metrics from all of your servers, apps and tools in one place. SourceForge users - Click here to start your Free Trial of Datadog now! http://pubads.g.doubleclick.net/gampad/clk?id=241902991=/4140 ___ Ganglia-general mailing list Ganglia-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ganglia-general
[Ganglia-general] per-cluster authorization
Hi, I want to allow users to access Ganglia for some clusters but not for other clusters. Following the instructions at https://github.com/ganglia/ganglia-web/wiki/Authorization-System, I have: - added stuff to Apache's ganglia.conf: Alias /ganglia /usr/share/ganglia Options Indexes MultiViews FollowSymLinks AllowOverride None Allow from all Require all granted SetEnv ganglia_secret xx AuthType Basic AuthName "Ganglia Access" AuthUserFile /var/lib/ganglia/htpasswd Require valid-user - added stuff Ganglia's conf.php, intended to make myself an admin and to make (my only) two clusters private: addPrivateCluster( '' ); $acl->addPrivateCluster( '' ); $acl->addRole( 'alexis', GangliaAcl::ADMIN ); ?> - created an htpasswd file in the right place with an entry for myself. Now I go to http://my-site/ganglia. At this grid level, I see the basic graphs for the 'unspecified grid' and, listed underneath, are two private clusters. Okay so far. From the 'grid --> choose a source' pulldown menu I select one of my two clusters but get a simple page stating "Sorry, you do not have access to this resource." Apache's access_log shows just: ..."GET /ganglia/?r=hour===load_one=by+name==m==false HTTP/1.1" 403 116 "http://my-site/ganglia/?m=load_one=hour=by%20name=4=2; ... This is SL7 with Ganglia from EPEL, versions: ganglia-web-3.7.0-3.el7.x86_64 ganglia-3.7.1-3.el7.x86_64 ganglia-gmetad-3.7.1-3.el7.x86_64 I've done plenty of googling, but not found anything. Has anybody any ideas why this is not working? Thanks! Alexis -- Monitor Your Dynamic Infrastructure at Any Scale With Datadog! Get real-time metrics from all of your servers, apps and tools in one place. SourceForge users - Click here to start your Free Trial of Datadog now! http://pubads.g.doubleclick.net/gampad/clk?id=241902991=/4140 ___ Ganglia-general mailing list Ganglia-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ganglia-general