You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2014/08/20 17:30:19 UTC

[18/50] [abbrv] git commit: AMBARI-6913. A lot of Ganglia metrics are absent on UI on Centos 5.9 (aonishuk)

AMBARI-6913. A lot of Ganglia metrics are absent on UI on Centos 5.9 (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0116db8d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0116db8d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0116db8d

Branch: refs/heads/branch-alerts-dev
Commit: 0116db8d5ebcfcd919bc908f51bc802dd0c8f018
Parents: 26c1edc
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Tue Aug 19 16:03:34 2014 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Tue Aug 19 16:03:34 2014 +0300

----------------------------------------------------------------------
 .../2.0.6/services/GANGLIA/package/templates/rrd.py.j2    | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0116db8d/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/templates/rrd.py.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/templates/rrd.py.j2 b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/templates/rrd.py.j2
index 055c810..65d70e2 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/templates/rrd.py.j2
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/templates/rrd.py.j2
@@ -18,6 +18,9 @@ See the License for the specific language governing permissions and
 limitations under the License.
 '''
 
+# NOTE: This script is executed by Python 2.4 on Centos 5. 
+# Make sure your changes are compatible.
+
 import cgi
 import glob
 import os
@@ -109,7 +112,12 @@ def collectStatMetrics(clusterName, hostName, metricName, files, cf, start, end,
     if timestamp is None and stepsize is None and concreteMetricName is None:
       timestamp = rrdMetric[0][0]
       stepsize = rrdMetric[0][2]
-      suffix = metricStat if not isRate else '_rate.' + metricStat
+      
+      if not isRate:
+        suffix = metricStat
+      else:
+        suffix = '_rate.' + metricStat
+      
       concreteMetricName = file.split(os.sep).pop().replace('rrd', suffix)
 
     metricValues = rrdMetric[2]