ganglia/ganglia-web — pull request #138 by ke3vin (2012-11-08 14:03:08+00:00)
Title: Show reports only if their associated metrics are defined

We have a large number of custom reports but only some of our monitored hosts
collect metrics appropriate for those reports. The current web front end shows
an empty graph when the metric isn't present.

This commit adds a configuration array parameter ($report_to_metric) to
associate metrics with reports. In host view, if the specified metric
isn't defined for a given host, then the report won't be shown. In cluster
view, if the specified metric isn't defined for the first host in the
cluster, then the cluster summary report won't be shown.

(Ideally this should probably be handled by the report module itself, but since
the report module isn't called until after the page layout has already been
determined, this isn't currently feasible)